20

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
Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
Neo
  • 696
  • 1
  • 14
  • 33

8 Answers8

21
Giridharan
  • 708
  • 7
  • 16
  • 1
    Correct me if I'm wront, but newer API emulators such as Android 8 and 9 won't start with just 512 MB. – andreszs Jul 20 '18 at 15:38
  • 1
    My Android Studio AVD Manager doesn't show anything about the RAM even with advanced options showing. – JeremyF Dec 13 '19 at 16:34
12

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

msanford
  • 11,803
  • 11
  • 66
  • 93
Samuel Kogan
  • 121
  • 1
  • 3
  • 1
    now default path is /Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Manager – Simon Meyer Aug 17 '15 at 12:32
  • 2
    For me it's /AppData/Local/Android/Sdk/extras/intel/Hardware_Accelerated_Execution_Manager (not ...ApplicationData...) – Glenn Lawrence Jun 02 '16 at 14:31
  • You also need to make sure the emulator isn't running at the same time or you will get an error like "Failed to update Intel HAXM" – Glenn Lawrence Jun 02 '16 at 14:42
  • On a Mac it should be something like this: `cd $ANDROID_HOME/extras/intel/Hardware_Accelerated_Execution_Manager silent_install.bat -m 1024` – Joshua Pinter Jan 19 '17 at 03:54
  • I just get: Silent installation failed, please see /private/tmp/haxm_silent_run.log for details! And the log file says a few things but mainly: "No emulator instance exist!" – JeremyF Dec 13 '19 at 16:43
6

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.

3

In Android Studio, version 1.2.1.1:

Go to "Tools -> Android -> AVD Manager -> Chose your device -> Edit -> Advanced Settings -> Change the RAM parameter to 512 Mb.

Save it, and run the App in the Emulator. It should run now.

ArunDhwaj IIITH
  • 3,833
  • 1
  • 24
  • 14
1

If you are using Android studio and facing problem with emulator Ram size then follow the step:

Go to Tools -> Android -> AVD Manager -> (select you device ) -> Edit device -> Show advanced setting -> New Device -> Choose Change button -> New Hardware profile -> Change the Memory size to 512M -> Edit device in the right bottom corner then -> finish.

theoretisch
  • 1,718
  • 5
  • 24
  • 34
Aman Singh
  • 23
  • 3
0

It seems that the AVD does not like to set the memory in GB. If it does not save the new setting in GB change it to MB.

Zvi
  • 2,354
  • 2
  • 26
  • 37
0

In my case, this issue happened when I click run twice unintentionally from AVD manager. I resolved this issue by killing the running instance from taskmanager (qemu-system-i386.exe).

Vino
  • 2,807
  • 1
  • 26
  • 22
0

I tried the above answers in Android Studio 3.0, but it seems AS 3.0 doesnt allow to change in the IDE screen, or not sure it was some problem with my installation. So I opened the AVD in disk and opened the config.ini, and changed the ramsize there. It worked.