20

My laptop: Intel Core 2 Duo CPU, 2GHz, 1GB RAM.

I created a target with SD Card 512MB, Device RAM size 512, snapshot enabled. I waited for 30 minutes but the emulator doesn't ends up loading. It keeps showing a flash word "Android" on the black screen.

Before running the emulator, I closed most other programs.

What's wrong with it? This is very frustrating. :(

emeraldhieu
  • 9,380
  • 19
  • 81
  • 139

7 Answers7

3

What is your CPU and RAM usage during startup? Do you have a lot of IO swapping occurring? Considering that Windows needs at least 512 to run right half of the time and Eclipse is a memory hog you probably just need more RAM.

Andrew White
  • 52,720
  • 19
  • 113
  • 137
  • CPU Usage now is 100%, PF Usage 1.73GB, I open Eclipse, Emulator and Firefox. 45 minutes passed. – emeraldhieu Jun 08 '11 at 12:59
  • Yeah, you're 73% over committed and the OS is trying to swap out all of the memory pages with pages on disk which is *extremely* slow. – Andrew White Jun 08 '11 at 13:02
  • Well, I have 16GB of RAM on my PC and giving >= 1GB to emulator crashes it. The best solution here is to use MIPS images I suppose. On my machine, loading of Android 4.2 MIPS image takes no longer than 2min. On the machine with 4GB of RAM it takes about 2-3min as well. – lomza Jan 17 '13 at 11:41
2

You're assigning the emulated Android instance half of the physical memory on your machine. Get more memory.

Graham Borland
  • 60,055
  • 21
  • 138
  • 179
  • And that's just for the SD card! – dmon Jun 08 '11 at 13:23
  • @dmon: Both the SD card and the device RAM are insane values. I usually use 32MB for the SD card, as it takes a while for the SD card image to be generated. However, that does not affect system RAM, as the SD card is just a file. The device RAM value has a far greater impact on the physical memory on the machine. – CommonsWare Jun 08 '11 at 13:41
  • @CommonsWare: yep, I always start my emulators with 10 MB SDs. And you're right, for some reason I got confused and thought it mapped the SD straight to memory. – dmon Jun 08 '11 at 13:57
2

Emulator is in general very slow, and the higher the OS version on the emulator, the slower it gets. I'm a game developer, and with my AMD Athlon X3 2.90 GHz with 4GB RAM it gives me 5-6 fps. I tried to open one of my apps on Honeycomb emulator, and it was really terrible. It opened, but I couldn't do anything with it. So the best answer is purchasing a real device.

Egor
  • 39,695
  • 10
  • 113
  • 130
  • I improved my RAM 2GB more (3GB now) and allocated 1024MB for "Device RAM size". It now ends up loading but it's still very slow, I think it is no longer the issue of RAM, is it related to graphics card? – emeraldhieu Jun 11 '11 at 16:35
  • 2
    I don't know how fast should be a PC to make emulator work at least fine, with no lags and slowdowns. Improving the computer will maybe give a bit more speed, but I'd prefer spending money on purchasing devices, at least a phone and a tablet. – Egor Jun 11 '11 at 17:40
2

It shouldn't take more than 5-10min at most to build the emulator on initial startup. The SD card size has no effect on memory usage, it's not loaded into memory, it just creates a larger image file for the sdcard. Setting the emulator to have 256mb of ram will help, but in general when I have the same problem I just close down the emulator window and re-start it. Sometimes it just gets hung-up on creation and isn't a memory issue (I have 16gb of ram and still have the problem from time to time)

Chris
  • 328
  • 2
  • 2
1

I've experienced the same thing and in my case I had to set "Min SDK Version" when creating the project in Eclipse. Without this setting the emulator didn't start.

Daniel
  • 429
  • 2
  • 9
  • 20
0

Android Development Tools (ADT) 9.0.0 (or later) has a feature that allows you to save state of the AVD (emulator), and you can start your emulator instantly. You have to enable this feature while creating a new AVD or you can just create it later by editing the AVD.

Also I have increased the Device RAM Size to 1024 which results in a very fast emulator.

Refer the given below screenshots for more information.

enter image description here

enter image description here

And for speeding up your emulator you can refer to Speed up your Android Emulator!:

Girish Patel
  • 1,270
  • 4
  • 16
  • 30
-1

The native Android emulator is really slow. It's much faster if you use Android on a virtual machine. You can follow my detailed guide on setting it up. http://www.bobbychanblog.com/2011/07/faster-android-emulator-alternative-using-virtualbox/

Bobby
  • 744
  • 9
  • 12