我尝试在Android Studio中运行我的Hello World应用程序。我得到了以下错误:

模拟器:ERROR: x86仿真目前需要硬件 加速度! 请确保Intel HAXM已正确安装并可用。 CPU加速状态:HAX内核模块未安装!

你能告诉我如何处理这个错误吗?


当前回答

Right click on your my computer icon and the CPU will be listed on the properties page. Or open device manager and look at the CPU. It must be an Intel processor that supports VT and NX bit (XD) - you can check your CPU # at http://ark.intel.com Also make sure hyperV off bcdedit /set hypervisorlaunchtype off XD bit is on bcdedit /set nx AlwaysOn Use the installer from https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager If you're using Avast, disable "Enable hardware-assisted virtualization" under: Settings > Troubleshooting. Restart the PC and try to run the HAXM installation again

其他回答

根据这个回复,完整的步骤是:

1)打开SDK管理器(在Android Studio中,进入Tools > Android > SDK管理器),如果没有下载英特尔x86模拟器加速器(HAXM安装程序)。

2)现在进入你的SDK目录C:\users\%USERNAME%\AppData\Local\Android\ SDK \extras\intel\Hardware_Accelerated_Execution_Manager\并运行名为intelhaxm-android.exe的文件。

如果你得到一个错误,如“英特尔虚拟化技术(vt,vt-x)未启用”。进入BIOS设置,启用“硬件虚拟化”。

3)重新启动Android Studio,然后尝试再次启动AVD。

显示模拟器窗口可能需要一到两分钟。

我能够解决我的问题,缺少加速与以下工作流程在Windows 10,联想,英特尔酷睿i7 CPU:

更改为HAXM安装文件夹: 当地C:\Users\ \ AppData \ \ Android Sdk \ \配件\ \ Hardware_Accelerated_Execution_Manager英特尔

打开cmd (MS-DOS) shell窗口,执行haxm_check.exe检查CPU是否支持HAXM -在我的情况下输出:

VT support -- yes
NX support -- yes

所以,我知道这是一个设置问题。因此,我在与Admin帐户相同的文件夹中启动了安装程序intelhaxm-android.exe,并删除了已安装的组件。在那之后,我尝试用相同的安装程序重新安装,并得到以下输出:

所以,我进入BIOS的CPU部分,打开加速/虚拟化-回到安装程序并重新运行它,这次我很高兴地看到如下输出:

之后,我重新启动Android Studio,并使用Tools>AVD Manager为模拟器定义了一个新的图像。然后,我可以通过点击AVD管理器列表中的模拟器列表中的播放按钮,看到模拟器成功启动:

或通过 -打开一个编译OK的示例项目 使用文件>同步项目与Gradle文件(构建所有工件) -在Android (TW)中选择应用程序项目,并单击运行>运行'app' -选择之前配置的模拟器显示我这个:-)

希望这有助于排除其他人的问题,这是真正由一个糟糕的设置实现造成的,因为缺少加速选项被Android Studio设置程序默默吞噬…: - (

我已经安装了HAXM,但它是一个较旧的版本。然后我从SDK管理器更新,然后模拟器工作!

对我来说,以下的解决方案是有效的:

1]进入BIOS设置并启用虚拟化。

Right click on your my computer icon and the CPU will be listed on the properties page. Or open device manager and look at the CPU. It must be an Intel processor that supports VT and NX bit (XD) - you can check your CPU # at http://ark.intel.com Also make sure hyperV off bcdedit /set hypervisorlaunchtype off XD bit is on bcdedit /set nx AlwaysOn Use the installer from https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager If you're using Avast, disable "Enable hardware-assisted virtualization" under: Settings > Troubleshooting. Restart the PC and try to run the HAXM installation again