Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio emulator fails to start with memory limit related error message

Tags:

I'm trying to run my first android studio project but I get this error message and the emulator doesn't start :

Created filesystem with 11/4224 inodes and 1302/16896 blocks
Failed to create Context 0x3005
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
emulator: WARNING: Requested RAM size of 1536MB is too large for your environment, and is reduced to 1152MB.
emulator: device fd:544
HAX is not working and emulator runs in emulation mode
emulator: The memory needed by this VM exceeds the driver limit.
Cannot set up guest memory 'pc.ram': Invalid argument
like image 952
Neo Avatar asked Feb 01 '15 23:02

Neo


People also ask

How do I allocate more memory to my Android Emulator?

Go to Tools->Android->AVD Manager , there's something like pencil to edit your AVD click on that, then in the pop-up window click Show Advanced Settings and there you can change the RAM size.

Why is my emulator not working Android Studio?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.

Can I use Android Studio in 8GB RAM?

Minimum space and configuration requirements: Officially android studio requires a minimum of 4GB RAM but 8GB RAM is recommended for it. It also requires a minimum of 2GB Disk Space but 4GB Disk Space is recommended for it. But these are the minimum requirements.


3 Answers

  • From Android studio open Windows->Select Android Virtual Device Manager->Chose your device->Click Edit button->Change the RAM parameter to 512 Mb in the Memory Options->Save and run the emulator it will work
  • Else you may use Genymotion Android Vm: https://www.genymotion.com/?utm_source=dlvr.it&utm_medium=twitter#!/download
like image 87
Giridharan Avatar answered Sep 28 '22 09:09

Giridharan


After Android Studio is installed

In CMD (Run As Admin) execute this command (Emulator should be closed):

//if it's installed on D:, at first, "cd" to that drive, like  "D:"
cd "%ANDROID_SDK_HOME%\sdk\extras\intel\Hardware_Accelerated_Execution_Manager"
silent_install.bat -m 1024

this will set HAXM memory to 1024Mb (max 1800). Set RAM parameter in VDM slightly below this value, like 980

If you are using Mac OS then use navigate to path /<USER_DIR>/Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Manager and execute sudo ./silent_install.sh -m 1024

like image 28
Samuel Kogan Avatar answered Sep 28 '22 08:09

Samuel Kogan


Try restarting your computer!

I was just wrestling with this problem and after an hour of scouring the web to no avail I tried restarting my computer and the problem was resolved.

like image 23
Richard P. Zwiren Jr. Avatar answered Sep 28 '22 09:09

Richard P. Zwiren Jr.