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

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

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


当前回答

这个答案适用于Windows 10版本1709的最新更新。没有尝试其他版本。但我希望它能起作用。

I also ran into similar issue in my windows 10 system. I disabled Hyper-V and I tried all the answers posted here. But after that also i faced the same issue. So after lot of try, made it work using an documentation available in haxm manual. The document menntioned to use a tool named Device Guard and Credential Guard hardware readiness tool provided by Microsoft to disable Hyper-V along with some other features(Remember not only Hyper-V. So little cautios) completely. Follow the below steps to do that.

从这里下载该工具的最新版本。 解压缩。 打开提升的(即以管理员身份运行)命令提示符,并通过更改提取路径和各自的版本号来运行以下命令。

“X:\path\to\dgreadiness_v3.6\DG_Readiness_Tool_v3.6.”ps1禁用”

重新引导。

然后如果你试着安装英特尔haxm,它会工作。

如果有最新的更新,请查看官方intel haxm开发链接中的文档。

希望它能帮助到别人。

其他回答

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

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。

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

打开Android SDK管理器,安装intelhaxm-86 emulator

在Mac上,Android SDK安装在:/Users/username/Library/Android/ SDK /,因此,你需要运行脚本sudo,如下所示:

sudo sh /Users/username/Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh

如果一切顺利,脚本将输出消息:“通过静默安装!”

然后,重新启动Android Studio并使用所需的AVD运行应用程序。

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

简单的解决方案:

打开Android SDK管理器,在顶部你可以看到“Android SDK位置”到那个位置,并遵循这个路径

英特尔\配件\ \ Hardware_Accelerated_Execution_Manager

在这里,您将得到“intelhaxm-android.exe”安装此安装程序。