Android 使用 AMD 处理器启动 AVD 时出错

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26355645/
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 11:17:32  来源:igfitidea点击:

Error in launching AVD with AMD processor

androidintelavdhaxm

提问by Jitesh Gaikwad

I have Windows 8.1 pro with an AMD processor. I installed the Android SDK and Eclipse. It works but the problem is that when I Create AVD and launch it shows this error:

我有带 AMD 处理器的 Windows 8.1 pro。我安装了 Android SDK 和 Eclipse。它有效,但问题是当我创建 AVD 并启动时,它显示此错误:

emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!

模拟器:错误:x86 模拟当前需要硬件加速!
请确保英特尔 HAXM 已正确安装和可用。
CPU加速状态:未安装HAX内核模块!

I have already installed Intel Hardware_Accelerated_Execution_Manager and I have enabled Virtual modulation from the boot menu, but it's still not working.

我已经安装了 Intel Hardware_Accelerated_Execution_Manager 并且我已经从启动菜单启用了虚拟调制,但它仍然无法正常工作。

回答by Pedro Oliveira

Make sure you have installed HAXM installeron your SDK Manager.

确保您已安装HAXM installer在您的 SDK 管理器上。

Android SDK Manager

Android SDK 管理器

After you download it and make sure you runthe setup located in: {SDK_FOLDER}\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm.exe

下载后并确保运行位于以下位置的设置: {SDK_FOLDER}\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm.exe

Note: in Android Studio, the command "intelhaxm.exe" has been changed to "intelhaxm-android.exe"

注意:在 Android Studio 中,命令“intelhaxm.exe”已更改为“intelhaxm-android.exe”

If you get the error "VT not supported"during the installation disable Hyper-V on windows features. You can execute this command dism.exe /Online /Disable-Feature:Microsoft-Hyper-V. You will also need "Virtualization Technology" to be enabled on your BIOS

如果您在安装过程中收到错误“不支持 VT”,请禁用 Windows 功能上的 Hyper-V。您可以执行此命令dism.exe /Online /Disable-Feature:Microsoft-Hyper-V。您还需要在 BIOS 上启用“虚拟化技术”

回答by TheOddAbhi

  1. Open SDK Manager and download Intel x86 Emulator Accelerator(HAXM installer) if you haven't.

  2. Now go to your SDK directory (C:\users\username\AppData\Local\Android\sdk, generally). In this directory, go to extras → Intel → Hardware_Accelerated_Execution_Managerand run the file named "intelhaxm-android.exe".

    In case you get an error like "Intel virtualization technology (vt,vt-x) is not enabled", go to your BIOS settings and enable hardware virtualization.

  3. Restart Android Studio and then try to start the AVD again.

  1. 如果还没有,请打开 SDK Manager 并下载Intel x86 Emulator Accelerator(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。

It might take a minute or 2 to show the emulator window.

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

回答by scottyab

If you're running Mac, as @pedro mentions ensure you have the HAXM installer dowloaded via the Android SDK Manager.

如果您运行的是 Mac,正如@pedro 所提到的,请确保您通过 Android SDK 管理器下载了 HAXM 安装程序。

Next install it! In finder navigate to /YOUR_SDK_PATH/extras/intel/Hardware_Accelerated_Execution_Manager/

接下来安装它!在查找器中导航到/YOUR_SDK_PATH/extras/intel/Hardware_Accelerated_Execution_Manager/

Run and install the .mpgk in the following .dmg

在以下 .dmg 中运行并安装 .mpgk

  • Yosemite: IntelHAXM_1.1.0_for_10.10.dmg
  • Pre-yosemite: IntelHAXM_1.1.0_below_10.10.dmg
  • El Capitan: IntelHAXM_6.0.1.dmg - please install the IntelHAXM_6.0.1.mpgk file within - it will ask you if you want to reinstall it. Just say yes.
  • 优胜美地: IntelHAXM_1.1.0_for_10.10.dmg
  • 优胜美地前: IntelHAXM_1.1.0_below_10.10.dmg
  • El Capitan:IntelHAXM_6.0.1.dmg - 请在其中安装 IntelHAXM_6.0.1.mpgk 文件 - 它会询问您是否要重新安装它。答应我。

Example:

例子:

$cd /YOUR_SDK_PATH/extras/intel/Hardware_Accelerated_Execution_Manager/
$open IntelHAXM_1.1.0_below_10.10.dmg
$cd /YOUR_SDK_PATH/extras/intel/Hardware_Accelerated_Execution_Manager/
$open IntelHAXM_1.1.0_below_10.10.dmg

回答by Mina Fawzy

First, you must enable Intel virtualization technology from the BIOS:

首先,您必须从 BIOS 启用 Intel 虚拟化技术:

Enter image description here

在此处输入图片说明

Second, navigate to your SDK ...\extras\intel\Hardware_Accelerated_Execution_Manager:

其次,导航到您的 SDK ...\extras\intel\Hardware_Accelerated_Execution_Manager:

Enter image description here

在此处输入图片说明

Then install intelhaxm-android.exe.

然后安装intelhaxm-android.exe

Note that if you can't find this file in the directory, make sure you install the package from your SDK manager:

请注意,如果在目录中找不到此文件,请确保从 SDK 管理器安装该软件包:

Enter image description here

在此处输入图片说明

回答by User_3535

This resolves it for me:

这为我解决了:

Go to (C:\users\%USERNAME%\AppData\Local\Android\sdk, generally).

转到(C:\users\%USERNAME%\AppData\Local\Android\sdk,一般)。

Then go to Extras -> Intel -> Hardware_Accelerated_Execution_Managerand run the file named "intelhaxm-android.exe".

然后转到Extras -> Intel -> Hardware_Accelerated_Execution_Manager并运行名为“intelhaxm-android.exe”的文件。

In case you get an error like "Intel virtualization technology (vt,vt-x) is not enabled", go to your BIOS settings and enable Hardware Virtualization.

如果您收到诸如“未启用英特尔虚拟化技术 (vt,vt-x)”之类的错误,请转到您的 BIOS 设置并启用硬件虚拟化。

Restart your studio

重启你的工作室

回答by Zeeshan

For AMD processors:

对于 AMD 处理器:

You don't need Genymotion, just create a new Virtual Device and while selecting the system Image select the ABI as armeabiinstead of the default x86 one.

您不需要 Genymotion,只需创建一个新的虚拟设备并在选择系统映像时选择 ABI 作为armeabi而不是默认的 x86 。

enter image description here

在此处输入图片说明

回答by rehan

I faced the same problem recently.

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

I installed the HAXM installer on your SDK Manager:

我在您的 SDK 管理器上安装了 HAXM 安装程序:

Enter image description here

在此处输入图片说明

And then installed the latest Intel HAXM driver:

然后安装最新的 Intel HAXM 驱动程序:

https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager-end-user-license-agreement

https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager-end-user-license-agreement

And voila!!! The emulator works like a charm :)

瞧!!!模拟器就像一个魅力:)

回答by Senthil Vel

For AMD processors:

对于 AMD 处理器:

Go to AVD manager and create a new virtual device as an ARM system image.

转到 AVD 管理器并创建一个新的虚拟设备作为 ARM 系统映像。

回答by Dash

So I am having this issue and it seems that unless you are on Linux you will not be able to use HAXM. [EDIT: this is if you have an AMD chip (non intel) of course as that is the issue]

所以我遇到了这个问题,似乎除非你在 Linux 上,否则你将无法使用 HAXM。[编辑:这当然是如果你有 AMD 芯片(非英特尔),因为那是问题]

As stated on the Android Site;

如 Android 网站所述;

Many modern CPUs provide extensions for running virtual machines (VMs) more efficiently. Taking advantage of these extensions with the Android emulator requires some additional configuration of your development system, but can significantly improve the execution speed. Before attempting to use this type of acceleration, you should first determine if your development system's CPU supports one of the following virtualization extensions technologies:

Intel Virtualization Technology (VT, VT-x, vmx) extensions

> AMD Virtualization (AMD-V, SVM) extensions (only supported for Linux)

许多现代 CPU 提供扩展以更有效地运行虚拟机 (VM)。在 Android 模拟器中利用这些扩展需要对您的开发系统进行一些额外的配置,但可以显着提高执行速度。在尝试使用这种类型的加速之前,您应该首先确定您的开发系统的 CPU 是否支持以下虚拟化扩展技术之一:

Intel Virtualization Technology (VT, VT-x, vmx) extensions

> AMD 虚拟化(AMD-V、SVM)扩展(仅支持 Linux)

As others have mentioned Genymotion may be a solution.

正如其他人所提到的,Genymotion 可能是一个解决方案。

回答by Joseph

I waste too much time on this, and none of the previous answers work. I find that Avastis the issue!!! If you have Avast installed in your system, you have to:

我在这上面浪费了太多时间,以前的答案都没有。我发现Avast是问题所在!!!如果您的系统中安装了 Avast,您必须:

Go to settings tab --> troubleshooting, then you should UNCHECK the "enable hardware-assisted virtualization"

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

Restart your PC and install the intelhaxm-android.exe if it is not installed. You can find it in C:\Users\{YOUR USERNAME}\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager

如果未安装,请重新启动您的 PC 并安装 intelhaxm-android.exe。你可以在C:\Users\{YOUR USERNAME}\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager