Link to home
Start Free TrialLog in
Avatar of Roger Alcindor
Roger Alcindor

asked on

Android Studio problem

I have just installed Android Studio 1.1.0

I have tried to run a Hello World project. the code compiles but I get an error when attempting to run the app on an Emulator. The following error is displayed:

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!

I have installed the HAXM.
I am running windows 8.1 as a VMWare virtual machine.

Any ideas please ?

Thanks, Roger
Avatar of Chris Harte
Chris Harte
Flag of United Kingdom of Great Britain and Northern Ireland image

Like it says you have to install HAXM which is an accelerator for the emulator. In android studio go to
Tools->Android->SDK Manager

This should bring up the installer for all the bits you need for development. At the bottom is extras, at the very bottom should be a tick box for the haxm software called "Intel x86 Emulator Accelerator (HAXM installer)" This will install it, though for me it took a couple of restarts. (Eclipse was much easier).
Then you have to create a new virtual device using the haxm accelerated option.

In both studio and eclipse I have to start the emulator first, then in run configure use the "run in attached device" option.
ASKER CERTIFIED SOLUTION
Avatar of Chris Harte
Chris Harte
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Roger Alcindor
Roger Alcindor

ASKER

HAXM is installed and I have checked the BIOS and virtualisation is enabled in the BIOS.

Can you explain how to "create a new virtual device using the haxm accelerated option" as suggested ?

I attach evidence that HAXM is installed.

User generated image
For completeness here is the whole process.

Tools->Android->AVD Manager
This will bring up your virtual device manager. In the bottom left is a new create virtual device button. Each option has a list of devices you can emulate. (I use Phone->Nexus 5). Next will give you a list of system images. Select an x86 with a target operating system you are going to use (these use HAXM).

Next is the ability to name the device and, under advance setting, alter the display size on your monitor. When you have finished, double click it in the list of available devices and it should start.

WARNING first time out this can take several minutes (several > 10).

Next to the run button in the toolbar should be a dropdown button that will bring up the Run/Debug Configurations. Under the general tab there is a 'Target Device' box. Select the emulator and the Prefer Android Virtual Device drop down should contain the emulator you just started. Apply. Now when you click run it will default to this device. If you right click your app in the 'Project' window it will give you the option to run or debug it. Run it and a dialog box should pop up asking if you want to run it in an existing device.

It should work. On my machine it is really slow, I find eclipse much more efficient.
I have discovered the cause of the problem. It appears that since I am running the software in a virtual machine using VMWare workstation, HAXM cannot be used. I found this at the link given below. The relevant information is shown highlighted below. Looks like I will need to use the ARM emulator. I plan to be using Embarcadero C++ Builder XE7 later on this year to develop mobile phone applications, I wonder if I will run into the same issue then?

http://developer.android.com/tools/devices/emulator.html#acceleration
User generated image
Thanks for your help.