Android 无法打开 HAX 设备!HAX 不工作,仿真器在仿真模式 仿真器中运行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20857256/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 03:36:07  来源:igfitidea点击:

Failed to open the HAX device! HAX is not working and emulator runs in emulation mode emulator

androidandroid-emulator

提问by user3137648

My Android emulator is running properly but it is showing this error every time I start the emulator.

我的 Android 模拟器运行正常,但每次启动模拟器时都会显示此错误。

Starting emulator for AVD AVD_for_Nexus_4 emulator: Failed to open the HAX device! HAX is not working and emulator runs in emulation mode emulator: Open HAX device failed emulator: emulator window was out of view and was recentered

启动 AVD 模拟器 AVD_for_Nexus_4 模拟器:无法打开 HAX 设备!HAX 不工作,模拟器在仿真模式下运行

I do not understand what is the exact problem.

我不明白确切的问题是什么。

回答by Michelle

I think you are trying to run an emulator based on x86. I got the same error when I just download the HAXM under Extras category of Android SDK Manager. Actually, you need install it. Go to the directory of extras and run the installation of HAXM. Hope this will solve your problem.

我认为您正在尝试运行基于 x86 的模拟器。当我在 Android SDK Manager 的 Extras 类别下下载 HAXM 时,我遇到了同样的错误。实际上,您需要安装它。转到 extras 目录并运行 HAXM 的安装。希望这能解决您的问题。

回答by L. G.

The solution of Rohan will fix the problem as the error message will not be shown but the emulator will not use the hardware acceleration and thus be again very slow.

Rohan 的解决方案将解决该问题,因为不会显示错误消息,但模拟器不会使用硬件加速,因此再次很慢。

I recommend instead to install the Intel Hardware Accelerated Execution Manager as described here:

我建议改为安装英特尔硬件加速执行管理器,如下所述:

https://stackoverflow.com/a/10772162/891479

https://stackoverflow.com/a/10772162/891479

回答by Dan Nestor

I had the same problem recently.

我最近遇到了同样的问题。

First you need to install HAXM in the Android SDK Manager (from the error message I think you already did that). This will enable the emulator to use the HAXM framework, and for this it needs to open the HAX device. On your system this cannot be found, hence the error message.

首先,您需要在 Android SDK 管理器中安装 HAXM(从错误消息中我认为您已经这样做了)。这将使模拟器能够使用 HAXM 框架,为此它需要打开 HAX 设备。在您的系统上找不到,因此出现错误消息。

To make this device available, you need to install the HAXM driver from Intel. You can find it here: http://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager(You also need to enable virtualization in your computer BIOS).

要使该设备可用,您需要安装来自 Intel 的 HAXM 驱动程序。您可以在此处找到它:http: //software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager(您还需要在计算机 BIOS 中启用虚拟化)。

Hope this helps.

希望这可以帮助。

回答by Rohan Kandwal

If you found “HAX is not working and emulator runs in emulation mode” problem while running android SDK. This mean your computer CPU must be intel core and must support “Hardware Accelerated Execution Manager”. It means that you have configured the emulator in a way which is not supported by your operating system.

如果您在运行 android SDK 时发现“HAX 不工作且模拟器在仿真模式下运行”问题。这意味着您的计算机 CPU 必须是英特尔核心,并且必须支持“硬件加速执行管理器”。这意味着您以操作系统不支持的方式配置了模拟器。

See this link solving the problem http://www.javaexperience.com/hax-is-not-working-and-emulator-runs-in-emulation-mode/#ixzz2p3inMj34

请参阅此链接解决问题http://www.javaexperience.com/hax-is-not-working-and-emulator-runs-in-emulation-mode/#ixzz2p3inMj34

Update : -

更新 : -

The link is down at the moment so posting archieved link of the webpage - https://web.archive.org/web/20151024002104/http://www.javaexperience.com/hax-is-not-working-and-emulator-runs-in-emulation-mode/

该链接目前已关闭,因此发布网页的存档链接 - https://web.archive.org/web/20151024002104/http://www.javaexperience.com/hax-is-not-working-and-emulator -在仿真模式下运行/

If your CPU isn't intel, then you have to edit your AVD and choose "CPU/ABI" as "ARM". For more details, please visit the link above.

如果您的 CPU 不是英特尔的,那么您必须编辑您的 AVD 并选择“CPU/ABI”作为“ARM”。有关更多详细信息,请访问上面的链接。

回答by Oleksiy

I just had to uninstall HAXM and install it again. Then it started working again. Hope this helps someone!

我只需要卸载 HAXM 并重新安装它。然后它又开始工作了。希望这可以帮助某人!

Edit:

编辑:

Oh wow, this was a long time ago. I have been using genymotionfor a few months now, and never had any issues like that.

哇哦,这是很久以前的事了。我已经使用genymotion几个月了,从来没有遇到过这样的问题。

回答by Amit Mandal

I had the same problem. Just after enabling Internet Virtualization from BIOS. After that let the system boot and install HAXM once again. Now emulator will run faster than before and HAXM will work. Enjoy!!

我有同样的问题。在从 BIOS 启用 Internet 虚拟化之后。之后让系统启动并再次安装 HAXM。现在模拟器会比以前运行得更快,而且 HAXM 也能工作。享受!!

回答by Paul3k

Check if the RAM configured in HAX installation is equal or lower than your AVD RAM (How to fix: "HAX is not working and emulator runs in emulation mode") that fixed mine.

检查在 HAX 安装中配置的 RAM 是否等于或低于修复了我的 AVD RAM(如何修复:“HAX 不工作,模拟器在仿真模式下运行”)。

回答by bsautner

I had this error and the other fixes didn't help me, but changing the CPU type the emulator used did get it working.

我遇到了这个错误,其他修复程序对我没有帮助,但更改模拟器使用的 CPU 类型确实让它工作了。

Create a new emulator and try using mips or arm for the cpu selection

创建一个新的模拟器并尝试使用 mips 或 arm 进行 CPU 选择