Error Message: emulator-arm.exe has stopped working - android

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'!

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.

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

Here's how to fix it and keep your desired amount of RAM:
Go into the AVD folder (example: C:\Users\username\.android\avd\phone.avd)
Open the "config.ini" file in Wordpad.
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.

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

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!

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.

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

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!!

Marking "Use Host GPU" checkbox worked for me.

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.

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.

Go to Window->Open Prespective->DDMS
you will see view as mention below
click on the portion i have highlighted and click on reset adb,and try to run your project again

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.

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

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

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).

Just rebooting my PC worked for me.

Related

Could not open avd_name.avd/cache.img

When i run emulator, i get the following error:
Cannot launch AVD in emulator.
Output:
Hax is enabled
qemu-system-x86_64.exe: -drive if=none,index=1,id=cache,file={path_to_SDK}\SDK.android\avd{AVD_name}.avd/cache.img: could not open disk image {path_to_SDK}\SDK.android\avd{AVD_name}.avd/cache.img:
Could not open '{path_to_SDK}\SDK.android\avd{AVD_name}.avd/cache.img':
Invalid argument
Hax ram_size 0x40000000
HAX is working and emulator runs in fast virt mode.
Error accepting connection, aborting
AVD specs are:
OS: Android 6.0 Google APIs
RAM: 1GB
Resolution: 1440x2560
Running on Android Studio 2.0 Beta 6, Windows 10.
Keep an eye out for a background qemu-system-i386.exe process running in the background that will be locking the cache.img file.
This might be still running from a previously failed emulator launch. Kill that using Task Manager and start again.
I had the same problem already twice since I upgraded to Android Studio 2.0 on Windows 10. I use a preferred emulator in the Run/Debug configuration. Changing the Deployment Target Options in the configuration to Target: Show Device Chooser Dialog solved it for me. After choosing the same emulator instance in the dialog it started with no problem. Then I change back to the preferred emulator setting. Until the next time it breaks...
Hoping this helps.
I faced the same problem in Windows 10.
Clearing temp and %temp% folder followed by a restart of machine solved my problem.
I had this problem, when I didn't notice that emulator is already running :)

Android emulator doesn't launch despite console shows that apk is installed successfully and activity is starting

This question has been asked here multiple times but nothing works for me. I have installed Android SDK on Windows 7 and trying to run HelloWorld project on the emulator. Unfortunately it never launches and just always showing flashing ANDROID label. The console says:
Waiting for HOME ('android.process.acore') to be launched...
As suggested here i run my project as Android application once again and yes, things change, now the console happily tells me:
[2013-07-27 22:53:36 - HelloWorld] Uploading HelloWorld.apk onto device 'emulator-5554'
[2013-07-27 22:53:37 - HelloWorld] Installing HelloWorld.apk...
[2013-07-27 22:53:55 - HelloWorld] Success!
[2013-07-27 22:53:56 - HelloWorld] Starting activity com.example.helloworld.MainActivity on device emulator-5554
but the emulator remains unchanged, just flashing with ANDROID. Can anyone give an advice?
Increase ram for the virtual device and try to select a old device with small screen to emulate , btw some times the splash screen may take up to a minute to load depending in your computer
Consiter using this very fast alternative:
genymotion
You can launch from eclipse and android studio, it has great performance.

Why does Android Debug Bridge (adb) have to be restarted frequently?

This is what happens about half a dozen times every day:
An Android emulator (e.g. CPU/API: Intel Atom (x86), Target: API level 15) works fine for a little while, then Eclipse shows the following error when an app is installed
[2013-07-01 15:15:47 - Myapp] Failed to install myapp.apk on device 'emulator-5554': Connection refused: connect
[2013-07-01 15:15:47 - Myapp] java.net.ConnectException: Connection refused: connect
[2013-07-01 15:15:47 - Myapp] Launch canceled!
Sometimes closing and restarting the emulator will remedy this. However, most of the times, starting an emulator generates the following:
[2013-07-01 15:16:43 - Emulator] HAX is working and emulator runs in fast virt mode
[2013-07-01 15:16:43 - Emulator] emulator: warning: opening audio input failed
When this happens, the emulator will show up, but it will not work (i.e. apps cannot be installed). Resetting adb (DDMS > Device > Reset adb) will not work. I have to go to Windows Task Manager to kill adb.exe. Adb.exe will be restarted automatically in less than 20 seconds, and everything will be fine.
I am a bit sick of doing this many times every day, so I am seeking a way to avoid adb corruption.
Computer OS: Windows 8 Pro
CPU: Intel i5
Eclipse: Build id: 20121004-1855
Added on 2013-07-26:
I selected IronBlossom's response as the answer even though it does not answer this question specifically, but it solved the problem of having to restart ADB frequently. Actually, it solved multiple problems including a very significant one - unable to run Intel's Android emulators in fast mode and Windows Emulators simultaneously. There is a trick to run Genymotion emulators and Windows Phone emulators side by side.
Try using Genymotion . It runs on Oracle VM .
It even has GPS and Battery level features, comes pre-rooted with Superuser app.
I usually work with 2 computers, one is a High end computer playing windows 8 which I never got adb crashing or emulator running slow, but on my macmini with an i5 2415m and 2GB ram it crash a lot, but after I upgraded it to 5GB ram adb rarely get crashed, I can run 2 eclipses and 4 emulators and it rarely crashs.
So what I mean, is that maybe adb is not finished and it has some issues which may be related to memory leaks or thread synchronization, But (again but) it is just a shot on my experience, actually it never bothered me much.
When you hit a runtime error on device, instead of ctrl+c'ing out of adb, first click the prompt on the device acknowledging the crash has occurred. After that then ctrl+c out of adb. If it worked this should print out something happy.
adb devices

AVD showing only "Android" in emulator

Android Launch!
[2013-06-17 15:38:53 - Numberconverter] adb is running normally.
[2013-06-17 15:38:53 - Numberconverter] Performing com.example.channu.Numbersystem activity launch
[2013-06-17 15:39:00 - Numberconverter] Launching a new emulator with Virtual Device 'AMMA'
[2013-06-17 15:39:05 - Numberconverter] New emulator found: emulator-5554
[2013-06-17 15:39:05 - Numberconverter] Waiting for HOME ('android.process.acore') to be launched...
Nothing is wrong.
Waiting for HOME ('android.process.acore') to be launched...
Means that it is actually waiting for the OS to be loaded on the emulator. This usually takes a few minutes depending upon the configuration of the system you are using.
Just wait for a few minutes and you would be able to see the usual Android OS loaded on the emulator.
The usual console output when you launch an app on a new emulator is something like:
[2013-06-17 16:06:52 - FirstRun] New emulator found: emulator-5554
[2013-06-17 16:06:52 - FirstRun] Waiting for HOME ('android.process.acore') to be launched...
[2013-06-17 16:08:00 - FirstRun] HOME is up on device 'emulator-5554'
[2013-06-17 16:08:00 - FirstRun] Uploading FirstRun.apk onto device 'emulator-5554'
[2013-06-17 16:08:01 - FirstRun] Installing FirstRun.apk...
[2013-06-17 16:08:30 - FirstRun] Success!
[2013-06-17 16:08:30 - FirstRun] Starting activity dev.swm.firstrun.MainActivity on device emulator-5554
[2013-06-17 16:08:32 - FirstRun] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=dev.swm.firstrun/.MainActivity }
you can, wait for few seconds and then right click on the project and click run as Android application once again.
also, The only thing that works for me is the combination of three other good answers:
1- Project -> Clean
2- Delete all the AVDs and create new ones
3- If an attempt to run still hangs too long on 'Waiting for HOME' (over two minutes) or the emulator keeps rebooting every minute or so, try Run as Android App several times, choosing the same existing emulator instance (I always choose runs manually).
It's odd that no one has a clue why this problem comes up, what causes it or what is going on internally. The only clue I can supply is that DDMS shows a few lines like "Class not found for preloading: libcore.base.CollectionUtils" during the 'Waiting for HOME' pause.
if not try doing that and see if you can start & see if everything
works.
1) try using Emulator command
2) in Eclipse, Window->Adnroid SDK & AVD manager ->Virtual Devices,
then select the AVD, press Start button
After you see the starting as shown above by swayam's answer in Eclipse "Console", "charging" screen appears, but then I pressed the "Menu" button on the right side and my program displayed and functions correctly. Just a newbie trying to help.
It's a memory Problem. Increase the ammount of RAM, I had the same problem and increasing the RAM worked.
Best of luck
I set higher ram 756MB and then clicked on use host GPU and it did work after that. Win8 and used Nexus5 emulator API 19.
Create new Avd of the same Api you using and try it will work
I used to have the same problem and managed to solve it by disabling Hyper-V (provided that you are running a Windows machine).
To do that, go to Control Panel -> Add/Remove Programs -> Turn Windows Features on or off -> Uncheck Hyper-V
There is one thing though: the Hyper-V feature is not available in Home versions of Windows. Also disabling it prevents you from using Windows Phone emulators, so keep that in mind.
Had the same problem. Even the side buttons were not appearing. I increased the ram from 512 to 750mb, and it worked like a charm.

Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE? during running emulator

[2011-07-22 16:33:02 - Today] ------------------------------
[2011-07-22 16:33:02 - Today] Android Launch!
[2011-07-22 16:33:02 - Today] adb is running normally.
[2011-07-22 16:33:02 - Today] Performing com.horror.android.today.myMain activity launch
[2011-07-22 16:33:02 - Today] Automatic Target Mode: launching new emulator with compatible AVD 'google09'
[2011-07-22 16:33:02 - Today] Launching a new emulator with Virtual Device 'google09'
[2011-07-22 16:33:10 - Today] New emulator found: emulator-5554
[2011-07-22 16:33:10 - Today] Waiting for HOME ('android.process.acore') to be launched...
[2011-07-22 16:34:07 - Today] HOME is up on device 'emulator-5554'
[2011-07-22 16:34:07 - Today] Uploading Today.apk onto device 'emulator-5554'
[2011-07-22 16:35:12 - Today] Installing Today.apk...
[2011-07-22 16:35:31 - Today] Installation error: **INSTALL_FAILED_INSUFFICIENT_STORAGE**
[2011-07-22 16:35:31 - Today] Please check logcat output for more details.
[2011-07-22 16:35:32 - Today] Launch canceled!
EDIT
I solved on emulator but on device , what is the solution?
I follow this question but sometimes thats not best idea for me.
you need to increase virtual memory of emulator
How to increase virtual memory of emulator
emulator -avd "Emulator Name" -partition-size 500
after then try to install your apk
if you got any error then see conversation of this question
I've had the same problem but on my phone (not emulator) when developing.
To solve it when it happens I go into Settings->Applications->Manage Applications -> The app I'm working with
and press Force Close, after that it works. For me this error occurs every 4-5 build, but using the Force close strategy makes it bearable (I used to restart the phone).
Phone: Sony Ericsson Xperia Ray.
**Android Version: 4.0.3
Development Environment: Eclipse Ingido
An Android virtual device provides per default only 64M for the storaging Android applications. You can clean your installed application by re-starting the emulator and selecting the "Wipe user data" flag.
also you you can edit the emulation data partition size permanent through avd manager -> emulator name -> edit -> hardware -> Ideal size of data partition = "2048"
If You are Installing the application to the Emulator then Some times it happend.
I face same Problem and i have solve it by my way.
In my Problem, I have install the application in emulator that is larger as like more then 10mb. And After that, i am going to Install another Application to that emulator and got this error..
Sollution:
I have just Restart the Eclipse that will erace all unwanted Memory and will get refresh to install the new Application.
Note: Its only works for some Normal perpose. as like to get error after installing another application. . .etc. Otherwise follow CapDroid's answer.
Thanks.
Just in case it helps for others.. I resolved it by wiping the emulator, and then restart
I follow following link, which has better to solve my problem.
http://google-androidlovers.blogspot.com/2011/07/solution-android-installfailedinsuffici.html
Solution to INSTALL_FAILED_INSUFFICIENT_STORAGE error on Android
http://forum.xda-developers.com/showthread.php?t=1201156
http://groups.google.com/group/android-developers/browse_thread/thread/41852900bd603070/583943d91dc9f754?lnk=gst&q=insufficient+memory&pli=1

Categories

Resources