Windows 7 64bit android AVD start error:Failed to allocate memory: 8

Gino picture Gino · Jul 2, 2012 · Viewed 16.8k times · Source

I just updated to Android SDK Tools r20, and try to create avd base on android 4.1 and WXGA, but I got error message when I start AVD.

config.ini:

hw.mainKeys=no
hw.lcd.density=320
sdcard.size=512M
skin.name=WXGA720
skin.path=platforms\android-16\skins\WXGA720
hw.cpu.arch=arm
hw.keyboard.lid=no
abi.type=armeabi-v7a
hw.cpu.model=cortex-a8
vm.heapSize=48
hw.ramSize=1024
image.sysdir.1=system-images\android-16\armeabi-v7a\

error message:

Starting emulator for AVD 'android4.1'
Failed to allocate memory: 8
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Error was only output when i chose WXGA skin, whichever 720 or 800 I saw Failed to allocate memory: 8 page to find solution and tried to change ram size, but didn't solve my problem.

My system environment:

OS: windows 7 64bit
memory: 4GB 

I tried to start android 4.0.3 WXGA in windows 7, got same error. But same machine in Ubuntu 64bit android SDK tools r18, create android 4.0.3 WXGA, start normal.

So, what can I do for this problem?

Answer

Joakim Arborelius picture Joakim Arborelius · Aug 12, 2012

This seems to be a problem with SDK Tools r20, in which the amount of RAM can not be set from the AVD Manager for the WXGAxxx skins (and the default 1024 MB is too much for the 32 bit emulator).

Workaround

You can work around the issue by starting the AVD from the command line, and hard set the amount of memory to something lower:

> cd c:\program (x86)\android\android-sdk\tools\
> emulator @android4.1 -memory 896

The above command line will set the amount of memory to 896 MB for the AVD. This bug can be followed here: http://code.google.com/p/android/issues/detail?id=36080