Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I boot an AVD from Eclipse with 1024 MB of RAM?

So, like a lot of people starting Android development with Eclipse, even with a fast machine, I notice that the emulator runs frustratingly slow.

I search SO for any tips to make it run faster and I run across this question, whose top answer suggests a couple of things, including making the AVD have more RAM. They suggest 1024MB:

enter image description here

Sounds good. But when I try to launch it, I get this:

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.

If I set it to 512MB (up from the default 256MB) it launches fine.

But why, on a Windows 7 x64 machine with 12GB of physical RAM can I not allocate 1024MB to an AVD? Is it an Eclipse limitation? Emulator limitation? Java limitation? I presume the person in that other question got it working but I've yet to figure out how and most of the responses I see elsewhere say "yeah dial it down to 512MB" which is not the answer I'm looking for.

like image 313
Tom Kidd Avatar asked Jan 13 '12 16:01

Tom Kidd


1 Answers

From Galaxy s3 emulator:

There is a common problem when setting up the AVD that you have to manually edit the config file to fix. File is located at C:\Documents and Settings\username\.android\avd\name_of_avd.avd\config.ini

Change the memory settings from

hw.ramSize=1024

to

hw.ramSize=1024MB

(Do not enable word wrap in notepad).

Save the file and reopen the avd. This worked for me.

like image 77
user2005091 Avatar answered Sep 20 '22 08:09

user2005091