3
votes

I have a problem with emulator in Android Studio 2.1.2.

When I try launching my AVD, I receive a message which says:

Cannot launch AVD in emulator.

Output:

Hax is enabled

The memory needed by this VM exceeds the driver limit.

Hax ram_size 0x60000000

HAX is not working and emulator runs in emulation mode.

qemu-system-i386.exe: -drive if=none,index=0,id=system,file=E:\Program Files\Android\Sdk/system-images\android-24\google_apis\x86/system.img,read-only: could not open disk image E:\Program Files\Android\Sdk/system-images\android-24\google_apis\x86/system.img: Could not open 'E:\Program Files\Android\Sdk/system-images\android-24\google_apis\x86/system.img': Invalid argument

I don't know what to do.

Please give me some help.

1

1 Answers

0
votes

The way I solved it is by setting the AVD memory limit and HAXM memory to be equal in size which is 1 GB = 1024 MB. The AVD cannot have higher memory limit than the HAXM.

1. Setting the HAXM memory to be 1024 M

The only way to change the HAXM memory is by installing it again. I did it using the terminal. Locate Hardware_Accelerated_Execution_Manager in your machine. Then change directory that folder to run the installation script.

cd ~/Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Manager

-OR-

cd ~/Library/Developer/Xamarin/android-sdk-macosx/extras/intel/Hardware_Accelerated_Execution_Manager

May need to change permissions:

sudo chmod 755 "HAXM installation"

Then:

./HAXM\ installation -m 1024

-OR-

sudo ./"HAXM installation" -m 1024

2. Setting the virtual device the same size with HAXM memory limit

enter image description here

This works for me. Good luck!