user5186472
user5186472

Reputation:

HAXM configuration in android studio

I tried to run a simple Android chat app from GitHub. I think there's a problem with my HAXM configuration. When I run the app I see these errors:

HAXM is not working and emulator runs in emulation mode

emulator The memory needed by this AVD exceeds the max specified in your HAXM configuration.

emulator: AVD RAM size = 1536 MB

emulator: HAXM max RAM size = 768 MB

emulator: You might want to adjust your AVD RAM size and/or HAXM configuration to run in fast virt mode.

emulator: warning: opening audio output failed creating window 61 83 462 820

emulator: emulator window was out of view and was recentered

What is wrong?

Upvotes: 21

Views: 40251

Answers (7)

Neil Deshmukh
Neil Deshmukh

Reputation: 121

The memory needed by this AVD should not be exceeds the max specified in your HAXM configuration.

  • It should be less than RAM set for HAMX.
  • Go to ~\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager \intelhamx_android.exe.

  • Reinstall intel HAXM and set its RAM to 1024MB.

  • Edit your AVD set its RAM to 768MB.

  • Build and run your application.

If you cant change the RAM via reinstalling it means you installed HAXM via Android Studios.

  1. Ctrl + Alt + S
  2. click on SDK Tools
  3. uncheck the box for Intel HAXM (Intel HAXM Installer)
  4. click Apply
  5. recheck the box for Intel HAXM and the program should now ask you to reenter the RAM Usage via slider or number

Upvotes: 12

Mustafa Tameemi
Mustafa Tameemi

Reputation: 1174

Just go to:-

Help >> Edit Custom VM options >> (see the picture below) >> Then close the file >> Restart android studio

enter image description here

Upvotes: 1

Rahul Tiwari
Rahul Tiwari

Reputation: 6978

your HAXM RAM is lower than your AVD RAM.

Solutions:

  1. Re-run you HAXM installation and increase RAM to match that of AVD(emulator).
  2. Alternatively, decrease RAM of AVD(emulator) to match that of HAXM.

Upvotes: 17

shem
shem

Reputation: 4712

Reinstall HAXM with more RAM:

sudo $ANDROID_SDK/sdk/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh -u
sudo $ANDROID_SDK/sdk/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh -m 1024

Upvotes: 18

ryadavalli
ryadavalli

Reputation: 139

Be sure when you increase your HAXM RAM configuration that your computer is able to handle this increased RAM. I use a 4GB RAM macbook pro that almost stopped responding after I increased HAXM RAM to 2GB. It may be a better option to decrease your AVD RAM.

Upvotes: 3

Herman Steigstra
Herman Steigstra

Reputation: 1

You have to increase the amount of RAM memory in: Tools >> Android >> AVD manager

Select your AVD, press "Edit this AVD" and under Advanced settings set the amount of RAM to i.e. 1500Mb

That will do the trick

Upvotes: -3

Related Questions