我尝试在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开发链接中的文档。

希望它能帮助到别人。

其他回答

在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运行应用程序。

我在这上面浪费了太多时间,我发现问题出在AVAST上!! 如果你在你的系统中安装了AVAST,你必须:

转到设置选项卡—>故障排除,然后您应该取消选中 “启用硬件辅助虚拟化”

重启电脑,如果没有安装intelhaxm-android.exe,请安装。 你可以找到它:

C:\Users\ {YOURUSERNAME} \ AppData \本地Android \ sdk \ \配件\ \ Hardware_Accelerated_Execution_Manager英特尔

我遇到了同样的问题,但在我的BIOS上关闭Hyper-V并启用VT-x后,我仍然无法安装intelhaxm-android.exe程序。

为了解决我的问题,我不得不关闭Windows防御程序内存完整性

检查这里的步骤-> https://github.com/intel/haxm/issues/105

启用虚拟化技术

这在我的案例中是有效的

重新启动计算机 连续按“Esc”键,然后按“F10”进入BIOS设置界面 配置 检查虚拟化技术

我的电脑是惠普Zbook 1. 引导设备进入BIOS(重新启动设备并继续按F10)。

导航到高级>设备或系统配置>选中“虚拟化技术(VTx)”和“虚拟化技术for Directed I/O (VTd)”前的复选框 保存更改并退出。

给我这样的傻瓜一个更详细的答案:

Open the SDK manager Select the SDK Tools tab. Download – Make sure that intel x86 Emulator Accelerator (HAXM) is downloaded. Install – Now that HAXM is downloaded, make sure it is installed. In the SDK window it will show you where the SDK is located on your computer: Click/tap 3 times quickly to highlight this text and copy the folder location. Open the file explorer and paste in the file location. From here you can search “hax” to find the folder location for HAXM stuff. Once a file comes up in the search results, right click and select “open file location”. For me the location was C:\Users\Datu1\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager . Find the file intelhaxm-android.exe and open/run it. Follow the instructions when it runs. You may wish to run haxm_check as an administrator (it’s in this same folder), but it may or may not work for you. The surefire way to tell if you can run hardware acceleration and if it’s enabled is to go to your computer’s bios settings from the startup menu. BIOS settings – Make sure hardware acceleration is enabled in your BIOS settings. The way to do this may vary a bit from system to system. You may need to press f10 or esc on startup. But with most (updated) Windows 10 computers you can access the BIOS settings by doing the following: type “advanced startup” in the Windows search bar; click on “change advanced startup uptions:” when it comes up. Click “Restart now”. After your computer restarts click on Troubleshoot. Click advanced options >firmware settings, then restart to change EUFI firmware settings. Wait for the restart then select the menu option for bios settings. With Intel processors the steps will be as follows or similar: Press the right arrow to go to the Configuration tab. Arrow down to Intel Virtual/Virtualizaion Technology and turn it on (should say Enabled). Exit and save changes. If Virtual Technology was previously disabled in your bios settings You will need to run the intelhaxm-android.exe file now to install haxm. Try restarting Android Studio and running your emulator again. If it’s still not working, restart your computer and try again, it should work.

注意:如果你打开了Windows Hyper-V,这将导致你不能运行haxm。如果你有hyper - v的问题,确保它在你的设置中被关闭:在Windows栏中搜索“hyper”;搜索结果会显示“打开或关闭Windows功能”。然后确保所有的Hyper-V盒子都是未勾选的。