28

I have been having issues running my first android app. Yesterday, i came close to running it but my happiness was dashed when i encountered this error:

emulator-arm.exe has stopped working

What do i do? I want to run this 'Hello World'

My Console Display:

[2011-07-28 10:46:52 - HelloAndroid] Android Launch!
[2011-07-28 10:46:52 - HelloAndroid] adb is running normally.
[2011-07-28 10:46:52 - HelloAndroid] Performing com.bestvalue.hello.HelloAndroid activity launch
[2011-07-28 10:46:52 - HelloAndroid] Automatic Target Mode: Preferred AVD 'my_avd' is not available. Launching new emulator.
[2011-07-28 10:46:52 - HelloAndroid] Launching a new emulator with Virtual Device 'my_avd'
[2011-07-28 10:47:13 - Emulator] emulator: emulator window was out of view and was recentred
[2011-07-28 10:47:13 - Emulator] 
[2011-07-28 10:47:14 - HelloAndroid] New emulator found: emulator-5554
[2011-07-28 10:47:14 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2011-07-28 10:47:28 - HelloAndroid] emulator-5554 disconnected! Cancelling 'com.bestvalue.hello.HelloAndroid activity launch'!
Ogugua Belonwu
  • 2,111
  • 6
  • 28
  • 45
  • have used a pc health/ registry cleaner; nothing changed – Ogugua Belonwu Jul 28 '11 at 12:27
  • so you installed the sdk and just created a new project and it doesnt run... have you tried creating a new emulator with different size? – Androider Jul 28 '11 at 12:47
  • 2
    Try allocating different (most likely lower) amount of RAM for your emulated device. In Eclipse: Window/AVD Manager then select your device, then Edit now set the Device ram size in hardware. U want as much as possible, so it will work faster. 1Gb is good but may cause that error. – Boris Gafurov Jun 19 '12 at 19:35

17 Answers17

46

Change the resolution of the device and it should work. It didn't work for me when the resolution was 1280X800. I changed it to 800X600 and it worked fine.

Mittal Patel
  • 806
  • 6
  • 8
  • i changed the hvga to default in android sdk and avd manager and it helps. – neobie Sep 06 '11 at 09:15
  • I also "changed the hvga to default in android sdk and avd manager and it helps". Thanks a lot! – Vit Khudenko Nov 14 '11 at 15:46
  • Mittal Patel it worked for me also. Thanks. I was trying to [using bundle of ] start the emulator of 7 inch with resolution 1024*640 but when it crash. When I used 10 inch emulator it is working fine. I don't know whats the reason. – Siddiq Abu Bakkar Feb 04 '13 at 06:45
  • 2
    Doesn't work. Also, what kind of device are you using that starts with a 1280 x 800? That is a monitor's resolution, not a phone's.... – gustavogbc Jun 11 '17 at 00:20
  • it works for me, thanx! I decrease the resolution to 480 x 800) – kokserek Aug 02 '20 at 12:48
34

After many attempts to fix, I found the following most helpful: Android: failed to allocate memory Running the emulator with 512mb of ram or less seems to be the only solution so far for me. Thanks

Community
  • 1
  • 1
user412533
  • 341
  • 3
  • 3
29

Here's how to fix it and keep your desired amount of RAM:

  1. Go into the AVD folder (example: C:\Users\username\.android\avd\phone.avd)
  2. Open the "config.ini" file in Wordpad.
  3. Modify the 'partition' and 'ram' lines to end in "MB" (See below for the proper syntax changes)

ORIGINAL: disk.dataPartition.size=512M

MODIFIED: disk.dataPartition.size=512MB

ORIGINAL: hw.ramSize=1024

MODIFIED: hw.ramSize=1024MB

Save the file, and then run the emulator again (e.g. "emulator.exe -avd phone"). You must repeat this process for each of your AVDs.

mydoghasworms
  • 18,233
  • 11
  • 61
  • 95
crobs808
  • 391
  • 3
  • 2
4

Might be old question but try executing directly from command line, assuming you are in android-sdk\toolsfolder run your created emulator by calling emulator-arm @youremulatorname

Dumbo
  • 13,555
  • 54
  • 184
  • 288
3

After some minutes searching Google and eventually Stackoverflow I finally came across a fix. Only way for reliably generate the crash during my experimentation was changing RAM size to 128 and in fact, many crashes depend on 2 problem:

  • PC Ram is less or equal to one defined in AVD. You must set it lower depending on your hardware RAM.
  • Also, some graphic and OpenGL issues found that can be fixed by changing default display to HVGA or setting a lower resolution in AVD.

Good luck!

Perception
  • 79,279
  • 19
  • 185
  • 195
2

emulator-arm.exe is not working due dual graphic card. select the basic graphical card not high performance one and is going to work. I have nvidia 555M and as bases Intel. Using intel the emulator starts.

marisxanis
  • 109
  • 8
1

Marking "Use Host GPU" checkbox worked for me.

1

i found tht using the avd manager to delete and recreate the virtual device without checking the snapshot enabled check box while creating the avd works. i found this on google group for android. although this issue hasnt been resolved, this method can be used as a workaround for this problem until this bug is fixed

syed
  • 11
  • 2
1

Two options worked for me: 1. Changing the emulator resolution. I don't know why, but if I change it, it just works. 2. Changind the "Number of emulated web cameras" variable to 0 in AVD.

Thank you very much for the help!!

junior
  • 11
  • 1
0

Finally solved this for me after trying all the options above. There is a solution at AndroidDevelopers on Google Plus.

If you want to have graphics acceleration enabled by default for this AVD, in the Hardware section of the AVD configuration, click New, select GPU emulation and set the value to Yes.

Pool
  • 11,999
  • 14
  • 68
  • 78
0

Go to Window->Open Prespective->DDMS

you will see view as mention below

enter image description here

click on the portion i have highlighted and click on reset adb,and try to run your project again

Aamirkhan
  • 5,746
  • 10
  • 47
  • 74
0

In my case, I had to set memory RAM from 1907 (default) to 512 to get it working

user1406716
  • 9,565
  • 22
  • 96
  • 151
0

Use a low resolution device, when I selected Nexus 4 it kept running smoothly with me.

Hasan A Yousef
  • 22,789
  • 24
  • 132
  • 203
0

Also worth checking that HAXM is installed/enabled (this fixed issue for me, without it got same error as you were reporting and it slowed my Mac to a crawl).

James
  • 1,985
  • 18
  • 19
0

If you don't see an emulator running, check Task Manager to see if you have an emulator-arm process already running. If there is an emulator-arm process, select it, choose "End Process", and try again.

Peter O.
  • 32,158
  • 14
  • 82
  • 96
Brian
  • 1
0

My case was that the skin setting somehow had been changed from WVGA800 to WVGA854 in AVD. After I switch it back, the emulator works.

Nikhil
  • 16,194
  • 20
  • 64
  • 81
H.J.
  • 1
-1

Just rebooting my PC worked for me.

Buben Ivanov
  • 159
  • 3