Why is the emulator in eclipse restarting? - android

I am following http://developer.android.com/training/basics/firstapp/running-app.html
and trying to run my first android app on the emulator on my PC.
The emulator is running (started from eclipse)
I managed to lauch myFirst App via eclipse as described, although in this tutorial it should be added you have to wait minutes before the emulator is up and running.
Now my problem is that when I modify myFirstApp, and wnat to test it, that eclipse keeps starting a new emulator:
[2012-10-15 19:32:44 - MyFirstApp] ------------------------------
[2012-10-15 19:32:44 - MyFirstApp] Android Launch!
[2012-10-15 19:32:44 - MyFirstApp] adb is running normally.
[2012-10-15 19:32:45 - MyFirstApp] Performing com.example.myfirstapp.MainActivity activity launch
[2012-10-15 19:32:45 - MyFirstApp] Automatic Target Mode: Preferred AVD 'Hobbit' is not available. Launching new emulator.
[2012-10-15 19:32:45 - MyFirstApp] Launching a new emulator with Virtual Device 'Hobbit'
This is extremely annoying, because of the performance penalty to launch a complete emulator.
But what is even more frustrating that I get back the very first version of MyFirstApp in this new emulator.
When I restart myself the emulator from scratch I see this in the console:
[2012-10-15 19:55:42 - MyFirstApp] New emulator found: emulator-5554
[2012-10-15 19:55:42 - MyFirstApp] Waiting for HOME ('android.process.acore') to be launched...
[2012-10-15 19:56:57 - MyFirstApp] emulator-5554 disconnected! Cancelling 'com.example.myfirstapp.MainActivity activity launch!'
Why? The emulator is still running at this point. This cannot be the normal way of working. Can anybody help me out?

Go to Run -> Run Configuration in eclipse. Select your application and update the target tab at right side to "Always prompt to pick device"

If the emulator is running and doesnt show in Devices then try to reset adb.
In eclipse: Device tab-> Dropbown - > reset abd

Related

Failed to install MyFirstApp.apk (Hello World!) on device

First, sorry for my ignorance. I'm trying to make the HelloWorld app run following step by step the tutorial here.
I can't load the app, as Android keeps showing me the message:
[2014-05-26 15:56:38 - MyFirstApp] Android Launch!
[2014-05-26 15:56:38 - MyFirstApp] adb is running normally.
[2014-05-26 15:56:38 - MyFirstApp] Performing mypackage.myfirstapp.MainActivity activity launch
[2014-05-26 15:56:38 - MyFirstApp] Automatic Target Mode: launching new emulator with compatible AVD 'MyNexusOne'
[2014-05-26 15:56:38 - MyFirstApp] Launching a new emulator with Virtual Device 'MyNexusOne'
[2014-05-26 15:56:38 - MyFirstApp] New emulator found: emulator-5554
[2014-05-26 15:56:38 - MyFirstApp] Waiting for HOME ('android.process.acore') to be launched...
[2014-05-26 15:57:02 - MyFirstApp] Android Launch!
[2014-05-26 15:57:02 - MyFirstApp] adb is running normally.
[2014-05-26 15:57:02 - MyFirstApp] Performing mypackage.myfirstapp.MainActivity activity launch
[2014-05-26 15:57:02 - MyFirstApp] Uploading MyFirstApp.apk onto device 'emulator-5554'
[2014-05-26 15:57:02 - MyFirstApp] Failed to install MyFirstApp.apk on device 'emulator-5554': No such file or directory
[2014-05-26 15:57:02 - MyFirstApp] com.android.ddmlib.SyncException: No such file or directory
[2014-05-26 15:57:02 - MyFirstApp] Launch canceled!
At the beginning, I have the same problem like in this question:
Waiting for HOME ('android.process.acore') to be launched
So I did as the suggested answer, "right click on the project and click run as Android application once again". At the first time, Android showed me a window to select the device, which I chose the only one available 'emulator-5554'. After choosing and running, Android showed me the message above. From the second time I run it, Android showed me directly the message, and didn't show the window to choose the emulator again.
It seems I have the same problem like in this question:
com.android.ddmlib.SyncException: No such file or directory
But none of the answers work for me.
In a desperate attempt, I already changed the ADB connection timeout to 10000ms.
Looks like the apk is build without any issues but when eclipse is trying to install, it is not finding the "MyFirstApp.apk".
Make sure the generated .apk file is in the "bin" directory. OR the eclipse is trying to read it from some other path.
Saw this question while trying to research why mine did the same thing. When I changed the Eclipse 'Run Configurations' option from 'Launch Default Activity' to Launch 'com.example.myfirstapp.MyActivity', the project was installed on the Android virtual device and happily loaded and ran properly. Took a very, very long time to load the Virtual Device, as others have said.

Android emulator in Eclipse does not work?

I have made a new AVD, created a new Blank Activity. The AVD is configured for Android 4.2.2, API level 17 and so is the blank activity.
However the log, when I run the activity, is this:
[2013-06-30 02:33:38 - myfirstapp] ------------------------------
[2013-06-30 02:33:38 - myfirstapp] Android Launch!
[2013-06-30 02:33:38 - myfirstapp] adb is running normally.
[2013-06-30 02:33:38 - myfirstapp] Performing com.example.myfirstapp.MainActivity activity launch
[2013-06-30 02:33:38 - myfirstapp] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2013-06-30 02:33:41 - myfirstapp] Launching a new emulator with Virtual Device 'HelloEmulator'
[2013-06-30 02:33:48 - myfirstapp] New emulator found: emulator-5556
[2013-06-30 02:33:48 - myfirstapp] Waiting for HOME ('android.process.acore') to be launched...
It launches some different, large-screen, emulator.
What have I done wrong?
There are two steps during launching your application with Android Virtual Device. First, launching the virtual device and second launching your application. If the virtual device is not already launched, it takes 3-4 min to be launched. During this step, the following message as you described above appears:
[2013-06-30 02:33:48 - myfirstapp] Waiting for HOME ('android.process.acore') to be launched...
Launching application is faster than launching the android virtual device.
evrey thing is going normal just wait
and to post emulator speed up you may check use GPU host and put ram size 850

problem with emulator failing to start correctly

Since last week when I run a project it starts the emulator but sooner I got this message and I have to close and restart again otherwise it refuse to install the apk. Does someone know some reasons and what I have to do beside destroy and rebuild the Avd cause it doesn't make any change. Thank you. Here's the console lines
[2011-07-30 19:39:24 - NewStavanger] ------------------------------
[2011-07-30 19:39:24 - NewStavanger] Android Launch!
[2011-07-30 19:39:24 - NewStavanger] adb is running normally.
[2011-07-30 19:39:24 - NewStavanger] Performing com.wocmultimedia.NewStavanger.Main activity launch
[2011-07-30 19:39:24 - NewStavanger] Automatic Target Mode: launching new emulator with compatible AVD 'avdGooglemarket'
[2011-07-30 19:39:24 - NewStavanger] Launching a new emulator with Virtual Device 'avdGooglemarket'
[2011-07-30 19:39:31 - NewStavanger] New emulator found: emulator-5554
[2011-07-30 19:39:31 - NewStavanger] Waiting for HOME ('android.process.acore') to be launched...
[2011-07-30 19:40:46 - NewStavanger] emulator-5554 disconnected! Cancelling 'com.wocmultimedia.NewStavanger.Main activity launch'!
A lot of times wiping the user data off the emulator will fix those types of problems, I've had emulators get pretty buggy sometimes, especially if you constantly open and reclose them. Reinstalling the emulator would likely fix the issue. If its setup is fairly simple, that should only take a few minutes.
Try this site:
http://phonedevelopment.blogspot.com/2010/09/android-emulator-5554-disconnected.html

Cannot run Android apps with eclipse on OS X 10.6

Running Eclipse 3.5.2 (Classic) in OS X 10.6.7 with the ADT plugin. I have the SDK installed and have run the SDK and AVD Manager to install all available platforms and tools. I have an AVD setup with Android 2.2 as the target API, and have configured the example 'Hello, Android' app for Android 2.1 Update 1, so compatibility should not be an issue. When I Run the application, it starts up the emulator, but gives me an error before the android startup animation appears. Here is the output in the Console window of Eclipse:
[2011-04-10 06:45:40 - HelloAndroid] ------------------------------
[2011-04-10 06:45:40 - HelloAndroid] Android Launch!
[2011-04-10 06:45:40 - HelloAndroid] adb is running normally.
[2011-04-10 06:45:40 - HelloAndroid] Performing com.twopoint7.testing.HelloAndroid activity launch
[2011-04-10 06:45:40 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'testDroid'
[2011-04-10 06:45:40 - HelloAndroid] Launching a new emulator with Virtual Device 'testDroid'
[2011-04-10 06:46:04 - Emulator] 2011-04-10 06:46:04.613 emulator[997:903] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
[2011-04-10 06:46:04 - HelloAndroid] New emulator found: emulator-5554
[2011-04-10 06:46:04 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2011-04-10 06:47:22 - HelloAndroid] emulator-5554 disconnected! Cancelling 'com.twopoint7.testing.HelloAndroid activity launch'!
Any advice on what might be going wrong would be greatly appreciated. I've found lots of posts (here and on other forums) that seem to indicate the NSQuickDrawView vs. Quartz warning seems to be a problem across the board but doesn't have a solution yet. I'm more concerned with the "emulator-5554 disconnected..." bit and the fact that I can't seem to run any apps in the emulator. Any other info I can provide which would be helpful? Any insight?
Thanks in advance for your time!
I guess you need to reset your adb after launch the emulator. In eclipse, go to window -> show view -> other -> device(under android folder).
In the device view, find and reset adb. Then run your apps.

emulator: ERROR: the user data image is used by another emulator. aborting

[2011-02-09 23:59:11 - Timerproject] ------------------------------
[2011-02-09 23:59:11 - Timerproject] Android Launch!
[2011-02-09 23:59:11 - Timerproject] adb is running normally.
[2011-02-09 23:59:11 - Timerproject] Performing acarin.timetracker.project.ezhil.Timerproject activity launch
[2011-02-09 23:59:11 - Timerproject] Automatic Target Mode: Preferred AVD 'MA_AVD_2.3.1' is not available. Launching new emulator.
[2011-02-09 23:59:11 - Timerproject] Launching a new emulator with Virtual Device 'MA_AVD_2.3.1'
[2011-02-09 23:59:31 - Timetracker] New emulator found: emulator-5554
[2011-02-09 23:59:31 - Timetracker] Waiting for HOME ('android.process.acore') to be launched...
[2011-02-10 00:01:40 - Timetracker] HOME is up on device 'emulator-5554'
[2011-02-10 00:01:40 - Timetracker] Uploading Timetracker.apk onto device 'emulator-5554'
[2011-02-10 00:01:40 - Timetracker] Installing Timetracker.apk...
[2011-02-10 00:04:11 - Timetracker] Failed to install Timetracker.apk on device 'emulator-5554!
[2011-02-10 00:04:11 - Timetracker] (null)
[2011-02-10 00:04:11 - Timetracker] Launch canceled!
i run the Timerproject but another timetrack project is only running the same timetracker project also doest responding
just close the already running emulator and start a new emulator more over if that doesn't works too close the eclipse too
If you're running Eclipse, and you've started the app from within (using Run As->Android App), then it should reuse the existing AVD. If it can't find it, then it will try to start another emulator and fail with the error you're seeing. Check the system Path environment variable and make sure it's including the SDK directory. If it doesn't then you'll see this error (I had the same problem; turned out I misspelled Program Files as Program Fiiles).
Hope this helps.
Open command prompt browse your adb path like
cd C:\Program Files\Android\android-sdk\platform-tools
type the command
adb kill-server && adb start-server
this will resolve your problem

Categories

Resources