Emulator: ERROR: x86 emulation currently requires

2019-01-01 10:02发布

问题:

I tried to run my Hello World application in Android Studio. I got the following error:

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!

Can you tell me what I can do with the error?

回答1:

As per this response, the complete steps are:

1) Open SDK Manager (In Android Studio, go to Tools > Android > 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\\extras\\intel\\Hardware_Accelerated_Execution_Manager\\ and 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.

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



回答2:

Install the Intel x86 Emulator Accelerator using the Android SDK Manager

\"Android

If you have Android Studio installed, you can start the SDK manager via Tools -> Android -> SDK Manager.

The Android SDK Manager does not actually install HAXM, it just downloads it. In the top of the Android SDK manager window, you can find where the installer is located on your PC. Please open the subfolder extras\\intel\\Hardware_Accelerated_Execution_Manager, and run the installer manually: intelhaxm-android.exe.

To use the intel HAXM, you need to have a CPU with virtualization support:

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)

If your CPU does not have virtualization support, you could use an ARM emulator instead:

You can edit an existing, or add a new Virtual Device in the Android Virtual device Manager, and change CPU/ABI to ARM. If that option is not available, you may need to change the target API of the Virtual Device, or download an ARM system image for the API version you want using the Android SDK manager.



回答3:

I was able to resolve my problem of the missing acceleration with the following workflow on Windows 10, Lenovo, Intel Core i7 CPU:

Changed to the HAXM setup folder: C:\\Users\\\\AppData\\Local\\Android\\Sdk\\extras\\intel\\Hardware_Accelerated_Execution_Manager

Opened a cmd (MS-DOS) shell Window and executed haxm_check.exe to check whether CPU supports HAXM - it outputs in my case:

VT support -- yes
NX support -- yes

So, I knew this most be a setup problem. So, I started the setup program intelhaxm-android.exe in the same folder with Admin account and removed the installed components. After that, I\'ve attempted to re-install with the same setup program and got this output:

\"HAXM So, I went into the CPU section of the BIOS and turned on acceleration/Virtualization - went back to the setup program and re-ran it, this time I was pleased to see this output:

\"enter

After that, I restarted Android Studio and used Tools>AVD Manager to define a new image for an emulator. I was then able to see the emulator starting up succesfully by clicking the play button in the list of emulators in the AVD Manager\'s list:

\"enter

or by - Opening a sample project that compiles OK - using File > Sync Project with Gradle Files (to build all artifacts) - Select the app item in the Android (TW) and click Run > Run \'app\' - Select the previously configured Emaulator showed me this :-)

Hope this helps to troubleshoot others with their problems that are really caused by a bad setup implementation since the missing acceleration option was silently swallowed by the Android Studio setup program ... :-(

\"enter



回答4:

Simple Solution :

Open Android SDK manager, on top side you can see the \"Android SDK Location\" go to that location and follow this path

\\extras\\intel\\Hardware_Accelerated_Execution_Manager

here you will get \"intelhaxm-android.exe\" install this setup.



回答5:

On Mac, the Android SDK gets installed at: /Users/username/Library/Android/sdk/, therefore, you will need to run the script as sudo, as follows:

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

If all goes well, the script prints the message: \"Silent installation Pass!\"

Then, restart Android Studio and run your app with the desired AVD.



回答6:

I wasted too much time on this, I find that the AVAST is the issue!!! If you have AVAST installed in you system, you have to:

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

Restart your PC, the install the intelhaxm-android.exe if it is not installed. You can find it:

C:\\Users\\{YOURUSERNAME}\\AppData\\Local\\Android\\sdk\\extras\\intel\\Hardware_Accelerated_Execution_Manager



回答7:

If you are using an AMD CPU, AMD Virtualization (CPUs such as Ryzen) is now officially supported. Make sure you have virtualization switched on in the BIOS.

In \"Turn Windows Features On or Off\" (you can find it through Windows Search), you\'ll need to enable

  • Windows Hypervisor Platform on Windows 10 17134.1 (1803) April 2018 update or newer (commonly not mentioned in articles)
  • Hyper-V

Once you restart and start up the emulator (an x86 build), it should start booting up without the mentioned error.



回答8:

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



回答9:

If you recently installed Docker on Windows OS, you need to turn off the Hyper-V feature. See the top answer of VT Not Supported when Installing HAXM



回答10:

I solved this Issue by enabling virtualization technology from system Settings.

Just followed these steps

  • Restart my Computer
  • Continuously press Esc and then F10 to enter BIOS setup
  • configuration
  • Check Virtualization technology

Your system settings may be changed According to your Computer. You can google (how to enable virtualizatino for YOUR_PC_NAME).

I hope it helps.



回答11:

One more possible reason: you installed HAXM and then updated BIOS settings by disabling virtualization. Or, updated BIOS version. Please check BIOS settings again, and be sure virtualization enabled.



回答12:

I had the same issue. In my case I found two issues causing the problem

  1. I had Hyper-V running, I think if any Virtualization programs running you need to uninstall
  2. I was running under Standard Account / Not Administrator


回答13:

This steps worked on Mint 17.2 Rafaela:

  1. Open a terminal and input this: sudo apt-get install qemu-kvm
  2. Restart your pc and enable virtualization technology on your BIOS setup
  3. In terminal again, insert this: sudo kvm-ok


回答14:

In the android sdk manager it says that it has hardware accelerator already installed but I think it is only downloaded not installed.I just manually installed the intelhaxm-android.exe and it worked for me.

plus I had docker installed , there were some answers to disable Hyper-V features, therefore I did that too, but not sure whether it helped or not.