Emulator: ERROR: x86 emulation currently requires hardware acceleration
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?
Solution 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.
Solution 2:
[edit] The Android developer page has been updated with an excellent guide to get an emulator up and running. [/edit]
Install the Intel x86 Emulator Accelerator
using the Android SDK Manager
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)
[edit] As of Nov 27, 2019, Google has released an emulator for AMD CPUs. [/edit]
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.
Solution 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:
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:
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:
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 ... :-(