Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 382
Mark wealse Avatar asked Mar 19 '15 02:03

Mark wealse


People also ask

How do I turn off HAXM acceleration emulator?

Open a command prompt as Administrator. Enter the command: bcdedit /copy {current} /d "Windows 8 - No Hyper-V" This will output an id with the format {GUID} that you need to copy it to use it in the next command. Enter the command: bcdedit /set { copied GUID of step 3 } hypervisorlaunchtype off.

How do I enable hardware acceleration on my Android?

Hardware acceleration is enabled by default if your Target API level is >=14, but can also be explicitly enabled. If your application uses only standard views and Drawable s, turning it on globally should not cause any adverse drawing effects.


2 Answers

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.

Intel x86 Emulator Accelerator (HAXM installer)

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.

like image 153
Daniil Shevelev Avatar answered Sep 16 '22 23:09

Daniil Shevelev


[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

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.

like image 32
KompjoeFriek Avatar answered Sep 16 '22 23:09

KompjoeFriek