我尝试在Android Studio中运行我的Hello World应用程序。我得到了以下错误:
模拟器:ERROR: x86仿真目前需要硬件 加速度! 请确保Intel HAXM已正确安装并可用。 CPU加速状态:HAX内核模块未安装!
你能告诉我如何处理这个错误吗?
我尝试在Android Studio中运行我的Hello World应用程序。我得到了以下错误:
模拟器:ERROR: x86仿真目前需要硬件 加速度! 请确保Intel HAXM已正确安装并可用。 CPU加速状态:HAX内核模块未安装!
你能告诉我如何处理这个错误吗?
当前回答
还有一个可能的原因:您安装了HAXM,然后通过禁用虚拟化更新了BIOS设置。或BIOS版本更新。请再次检查BIOS设置,并确保启用虚拟化。
其他回答
我已经安装了HAXM,但它是一个较旧的版本。然后我从SDK管理器更新,然后模拟器工作!
(编辑) Android开发人员页面已经更新了一个很好的指南,让模拟器启动和运行。 (/编辑)
使用Android SDK管理器安装Intel x86 Emulator Accelerator
如果你安装了Android Studio,你可以通过Tools -> Android -> SDK管理器启动SDK管理器。
Android SDK管理器实际上并不安装HAXM,它只是下载它。在Android SDK管理器窗口的顶部,您可以找到安装程序在您的PC上的位置。请打开extras\intel\Hardware_Accelerated_Execution_Manager子文件夹,手动运行安装程序:intelhaxm-android.exe。
要使用intel HAXM,你需要有一个支持虚拟化的CPU:
在尝试使用这种类型的加速之前,您应该首先 确定开发系统的CPU是否支持其中一种 以下虚拟化扩展技术: 英特尔虚拟化技术(VT, VT-x, vmx)扩展 AMD虚拟化(AMD- v, SVM)扩展(仅支持Linux)
(编辑) 截至2019年11月27日,谷歌发布了一款适用于AMD cpu的模拟器。 (/编辑)
如果你的CPU不支持虚拟化,你可以使用ARM模拟器:
您可以编辑现有的虚拟设备,或在Android中添加新的虚拟设备 虚拟设备管理器,修改“CPU/ABI”为“ARM”。 如果该选项不可用,您可能需要更改虚拟设备的目标API,或下载 你想要使用Android SDK的API版本的ARM系统映像 经理。
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
这个答案适用于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]进入BIOS设置并启用虚拟化。