How to make an AVD with > 768MB RAM To emulate Galaxy devices

孤者浪人 提交于 2019-12-06 14:52:54
Annihlator

using the suggestion of manually adding "mb" behind the memory size in your configuration file (as suggested in this thread: Android: failed to allocate memory ) (located at: %USERPROFILE%/.android/avd/name-of-your-avd/config.ini) has solved the 768mb problem here!

example that now works on my win7 x64 ultimate os -with- dedicated gpu;

avd.ini.encoding=ISO-8859-1
hw.sdCard=no
hw.device.manufacturer=Google
hw.mainKeys=no
hw.lcd.density=320
hw.accelerometer=yes
hw.dPad=no
hw.cpu.arch=x86
skin.name=720x1280
abi.type=x86
hw.device.hash=1197498893
hw.trackBall=no
hw.device.name=Galaxy Nexus
hw.camera.back=none
hw.sensors.proximity=yes
hw.battery=yes
disk.dataPartition.size=512M
hw.gpu.enabled=yes
image.sysdir.1=system-images\android-18\x86\
hw.audioInput=yes
hw.sensors.orientation=yes
hw.camera.front=none
hw.gps=yes
skin.dynamic=yes
skin.path=720x1280
hw.keyboard=yes
vm.heapSize=128
hw.ramSize=2048mb

I have tested this on two machines, my desktop and laptop both running Windows 7 X64 Ultimate

The Laptop has an Intel I7-4702MQ with 12GB ram and GeForce GTX765M The Desktop has an Intel I7-3820 with 32GB ram and has Ati 6950 in Crossfire and an Nvidia GTX560Ti (normally for physx).

The desktop only has issues in reliably starting the gpu acceleration while using crossfire, other then that i've had no issues with the emulator at all and even managed to assign 4096mb RAM with a 256VM Heap (however increasing the VM-heap above 128 seems to slowdown emulator initiation tremendously here)

On the desktop i also tested the 4096MB setup while even using a RAMDISK but this didn't increase performance too much.

Best settings overall (in my experience) in startup and responsiveness after just a few tests; 2048 with 128mb VM Heap size, gpu acceleration enabled.

Hope this helps out others!

I actually had a similar problem when running on Windows 7. When I relaunched Android studio with administrator privileges it worked. Otherwise I couldn't even open the AVD manager.

Tom Pace

This question may be a duplicate of:

Android: failed to allocate memory

I don't presume you would NOT do this, but I'm just going to say it anyway... Check the details of the correct answer, but especially check the comments for the correct answer.

Seriously, I hope this helps. Android and Eclipse issues have been a problem for me in the past until I learned to crush them with a Zen-like attitude and much exhaustive research and trial-and-error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!