Windows 7的64位的Andr​​oid AVD启动错误:无法分配内存:8分配、内存、错误、Windows

2023-09-05 01:49:37 作者:恍如隔世的容颜

我刚刚更新到Android SDK工具R20,并尝试建立在Android 4.1和WXGA AVD基地,但我得到的错误消息时,我开始AVD。

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文件:

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\

错误信息:

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.

误差仅为输出的时候我选择的WXGA皮肤,取720或800 我看到无法分配内存:8 页面找到解决办法,并试图改变RAM大小,但并没有解决我的问题。

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.

我的系统环境:

OS: windows 7 64bit
memory: 4GB 

我试图启动的Andr​​oid 4.0.3 WXGA在Windows 7中,得到了同样的错误。但在Ubuntu 64位的Andr​​oid SDK工具R18相同的机器,创造的Andr​​oid 4.0.3 WXGA,开始正常。

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?

推荐答案

这似乎与SDK工具R20的问题,其中RAM的数量不能从AVD管理器中设置为WXGAxxx皮(和默认1024 MB是吃不消的32位模拟器)。

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).

解决方法

您可以解决的问题,通过在命令行启动AVD和硬盘设置的内存量较低值:

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

上面的命令行将设置的内存量896 MB的AVD。 此错误可以在这里如下:http://$c$c.google.com/p/android/issues/detail?id=36080

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