0

I am a newbie to android development. I am trying to run emulator and I have got few errors on console of Android Studio version 1.2.2 IDE. As per the instructions given on numerous android tutorials, I had created a profile: Name : Nexus6API22 Resolution: 1440 x 2560: 560 dpi API : 22 Target : Google APIs CPU/ABI : x86 Size on Disk: 1 GB when I tried to invoke the AVD. I got the following error messages-

HAX is working and emulator runs in fast virt mode
Cannot set up guest memory 'pc.ram': Invalid argument
Error accepting connection, aborting

When I run this another AVD Profile: Name : try2 Resolution: 720 x 1280: xhdpi API : 22 Target : Google APIs CPU/ABI : x86 Size on Disk: 1 GB

It gave following errors/output

 ..tools\emulator.exe -netdelay none -netspeed full -avd Nexus6API22    

emulator: WARNING: Requested RAM size of 1536MB is too large for your environment, and is reduced to 864MB.
    emulator: device fd:584
    HAX is working and emulator runs in fast virt mode
    Cannot set up guest memory 'pc.ram': Invalid argument
    Error accepting connection, aborting

However I have executed msinfo32.exe command at command prompt to verify the actual RAM status. I have got the following output. Installed Physical Memory (RAM) : 4.00 GB Total Physical Memory : 2.64 GB Available Physical Memory (RAM) : 1.17 GB Total Virutal Memory : 5.27 GB Available Virutal Memory (RAM) : 2.21 GB Page File Space : 2.64 GB Page File : %\pagefile.sys

Does it meant, that, there is insufficient RAM availability in machine or something else to execute AVD?

What could be solution to this issue?

1

You need to reduce the RAM size of your emulator. Even if you have enought memory it is recommended to have 1GB or less than 1GB memory. As it automatically allocates 864MB edit your emulator in the AVD manager and reduce the AVD's RAM.

Open AVD Manager and select your device and click "Edit" button.

Then in "Memory Options" find the RAM parameter and set it to 512 or 864 for example. Click OK to save the current configuration and restart your application or AVD.

You also should not provide a RAM size for your emulator which exceeds your HAXM allocated memory. Since you are running the emulator in HAXM mode it will run faster than normal. So you don't have to worry about your devices' RAM.

  • after your suggestion I am able to run emulator. However what kind of issue one could face; if s/he allocates 512 MB RAM to AVD. Thank you ! – Nikhil G Sep 24 '15 at 11:36
  • 1
    I don't think you will face any issues since its the recommended value for running your emulator smoothly. You can always use values between 512 and 864 MB. And the AVD size on disk and RAM size of AVD's different. RAM is part of your AVD to run its apps. while AVD resides on your system which included the system images that you use with your AVD. So all of these will be combined and displayed as size on disk. – Lucky Sep 24 '15 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.