我刚刚更新到Android SDK Tools r20,并尝试在android4.1和WXGA上创建AVD,但我在启动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\错误消息:
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,我看到Failed to allocate memory: 8页面来寻找解决方案,并试图更改内存大小,但没有解决我的问题。
我的系统环境:
OS: windows 7 64bit
memory: 4GB 我尝试在windows7中启动android 4.0.3 WXGA,得到同样的错误。但同一台机器在Ubuntu 64位android SDK工具r18中,创建Android4.0.3WXGA,正常启动。
那么,我能为这个问题做些什么呢?
发布于 2012-08-12 06:03:55
这似乎是SDK Tools r20的一个问题,在该工具中,不能从WXGAxxx皮肤的AVD管理器设置RAM的大小(默认的1024MB对于32位仿真器来说太多了)。
解决方法
您可以通过从命令行启动AVD来解决此问题,并将内存容量硬设置为更低的值:
> cd c:\program (x86)\android\android-sdk\tools\
> emulator @android4.1 -memory 896上面的命令行将AVD的内存量设置为896 MB。这个bug可以在这里找到:http://code.google.com/p/android/issues/detail?id=36080
发布于 2013-06-11 11:03:23
像这样修改config.ini文件:
hw.ramSize=1024 --> hw.ramSize=1024M
它应该像魅力一样起作用。
参考:http://www.fantageek.com/102/strange-avd-with-hw-ramsize/
发布于 2012-09-04 23:58:14
您是否在笔记本电脑上运行模拟器?
如果模拟器的屏幕分辨率大于显示器的屏幕分辨率,也会出现此问题。例如,如果屏幕分辨率为(1366x768),则WXGA-xxx (1280x800)可能会崩溃。
尝试使用WSVGA。作为一个平板电脑,它做得很好。
https://stackoverflow.com/questions/11288142
复制相似问题