I'm busy learning how to build apps for Android, and I come across a very awkward problem.
When I run my application (with the green circle with the play-icon in it), it starts an Android emulator (like it should), but the application doesn't start once the emulator is booted. When I click the run-button again, it tries to start a second android-emulator. In the console-tab it gives the following messages:
[2011-11-07 20:57:15 - ScrollView Demo] Android Launch!
[2011-11-07 20:57:15 - ScrollView Demo] adb is running normally.
[2011-11-07 20:57:15 - ScrollView Demo] Performing testapp.scrollviewdemo.MainActivity activity launch
[2011-11-07 20:57:15 - ScrollView Demo] Automatic Target Mode: launching new emulator with compatible AVD 'Android_emulator'
[2011-11-07 20:57:15 - ScrollView Demo] Launching a new emulator with Virtual Device 'Android_emulator'
[2011-11-07 20:57:18 - Emulator] WARNING: Data partition already in use. Changes will not persist!
[2011-11-07 20:57:18 - Emulator] WARNING: SD Card image already in use: C:\Users\Roy\.android\avd\Android_emulator.avd/sdcard.img
[2011-11-07 20:57:18 - Emulator] WARNING: Cache partition already in use. Changes will not persist!
It's like Eclipse doesn't recognize the emulators it starts...
Weird thing is, sometimes it does recognize it, but most of the times it doesn't.
If it makes any difference: I'm running Eclipse IDE for Java Developers (Indigo Service Release 1) with ADT 15.0.0 on Win7 Home Premium 64bit
If the emulator has started, that may mean adb is acting up. Not sure on windows, but on mac/linux I do the following:
adb kill-server
sudo adb devices
You could try that (get rid of the 'sudo' business).
I don't think you're waiting long enough. There's 3 stages to go through
Wait until the android logo disappears on startup (unless you've disabled boot animations)
Wait for the locked screen to come up.
Wait for the app to be actually installed onto the device (you'll get a message saying 'Installing nameOfApp on Emulator device #whatever')
This whole process will take anywhere from 3 - 15 minutes. To speed things up, make sure you leave the emulator ON then you just need to do step 3.
If you try to click Run again before this is all done, it will incorrectly assume no emulator is up and start up a new one.
You can also make sure your emulator is ok by selecting Window -> Android SDK and AVD Manager and selecting Virtual Devices. You can even start a device up first (stages 1 and 2) without actually installing your app. You can also check the status of the device using DDMS (and make sure that it isn't actually installing your app and then silently crashing) by selecting DDMS at the top-right of Eclipse or Window -> Open Perspective -> Other -> DDMS
Hope this helps.
best way to just kill the current running server
adb kill-server
After starting the emulator, check the emulator name has been reflected in Eclipse->DDMS->Devices. If it is mentioned as "Online", you can just run the application and it wont launch new emulator. If it is mentioned as "Offline", go to "View Menu" option(a small down arrow button in Devices window) and reset the adb. This will restart adb and will make emulator Online.
Go to Command prompt and set the path where the adb is stored and give the following command:
First kill the adb by giving the command adb kill-server
and then start the adb by giving the command adb start-server(for windows)
Otherwise there is another option Go to DDMS and restart the adb.
I do not believe what you are witnessing is a bug at all.
You probably do not need to restart the adb.
What is happening is this:
If the current emulator you are running does not fit the minimum SDK of project you trying to run.
The Android SDK manager will run an emulator that does fit the minimum sdk requirement.
Related
I've checked every single related post (I know there're a lot) but still no one common solution works for me.
Almost every time users solve this issue by:
adb kill-server
sudo start-server
But not in my case. I do that and nothing happens. Nevertheless I cannot run my App in emulator, I can do it in normal physical device and it works!
I'm on latest OS X (ML). Latest for today sdk, adt, eclipse(kepler). Everything is up to date.
When I check adb devices, it's empty. Or when I switch to DDMS - same.
When running an app, it's starting displaying normal messages in console:
[2013-07-03 18:59:42 - NewApp] ------------------------------
[2013-07-03 18:59:42 - NewApp] Android Launch!
[2013-07-03 18:59:42 - NewApp] adb is running normally.
[2013-07-03 18:59:42 - NewApp] Performing vista.Start activity launch
[2013-07-03 18:59:49 - NewApp] Launching a new emulator with Virtual Device 'Hihi'
But after, the unlock screen is shown, the app appears to be not installed on the emulator.
I've tried different API levels and also reinstalled all eclipse, adt,etc. As well as deleted and recreated the virtual device.
The thing I've noticed is that the debug mode is OFF in the emulator. And if I change it and run again, it still OFF.
I'm really sorry for reposting, but I couldn't find exactly the same problem description.
PD: The other thing I've noticed is that sometimes eclipse prompts for something to allow or not with warning window. But it appears/disappears so fast that there's no time to read and answer.
Do I have all correct paths?
~/android-sdk-macosx/platform-tools/adb
~/android-sdk-macosx/tools/emulator
~/.android/avd/
/Applications/eclipse
keep your emulator on.. and reset your adb from device view
I am new to Android. When I am running my android application in eclipse I am getting these messages in the console:
[2011-03-08 12:57:35 - HelloWorld] ------------------------------
[2011-03-08 12:57:35 - HelloWorld] Android Launch!
[2011-03-08 12:57:35 - HelloWorld] adb is running normally.
[2011-03-08 12:57:35 - HelloWorld] Performing com.oreilly.helloworld.HelloWorldActivity activity launch
[2011-03-08 12:57:35 - HelloWorld] Automatic Target Mode: Preferred AVD 'MY_AVD' is not available. Launching new emulator.
[2011-03-08 12:57:35 - HelloWorld] Launching a new emulator with Virtual Device 'MY_AVD'
[2011-03-08 12:57:39 - HelloWorld] New emulator found: emulator-5554
[2011-03-08 12:57:39 - HelloWorld] Waiting for HOME ('android.process.acore') to be launched...
[2011-03-08 13:00:14 - HelloWorld] WARNING: Application does not specify an API level requirement!
[2011-03-08 13:00:14 - HelloWorld] Device API version is 11 (Android 3.0)
[2011-03-08 13:00:14 - HelloWorld] HOME is up on device 'emulator-5554'
[2011-03-08 13:00:14 - HelloWorld] Uploading HelloWorld.apk onto device 'emulator-5554'
[2011-03-08 13:00:14 - HelloWorld] Installing HelloWorld.apk...
[2011-03-08 13:02:22 - HelloWorld] Failed to install HelloWorld.apk on device 'emulator-5554!
[2011-03-08 13:02:22 - HelloWorld] (null)
[2011-03-08 13:02:23 - HelloWorld] Launch canceled!
How do I resolve the problems so that my application will launch?
Try changing the ADB connection timeout. I think it defaults that to 5000ms and I changed mine to 10000ms to get rid of that problem. If you are in Eclipse, you can do this by going through Window -> Preferences and then it is in DDMS under Android.
As described here: Android error: Failed to install *.apk on device *: timeout
Restarting the device works for me. Using adb install can get the apk installed, but it's annoying to use it everytime you launch the app when debugging within eclipse.
I get this from time to time, but it's usually related to the emulator being slow to start. Try again without closing the emulator between the retries. And if it still fails, please post the client logs (logcat).
Another reason can be a ghost Eclipse process running in background and still bound to the debugging port. Close eclipse, look at process list and see if there's still an Eclipse running. Kill all of them and restart Eclipse again.
If you are running it on an Android Emulator you do not want to close it between runs. The system will try to load the app and it will time out because of how long it takes the emulator to boot up. You can fix this by increasing the ADB time by going to Window -> Preferences -> Android -> DDMS and increasing the ADB time out (default is 5000ms) or by leaving the emulator open and just running it after the emulator is up and running.
I personally would recommend leaving the emulator open as it does load the apps relatively quickly once it is running, but it could be a drain on the system. Do whichever would help you more.
Something else you might want to consider is a hard reset of your emulator by wiping your user data.
In order to do this you:
- right click your project name in package explorer
- go to 'run as' then 'run configuration'
- in the 'run configuration' window click the 'target' tab
- then tick the name of your chosen emulator
- tick 'wipe user data', click apply
And the next time you start up your emulator it should prompt you asking whether you really want to wipe your data. Click yes, and hopefully it helps you to install the app.
I had the same problem and solved it by adding the paths of Android SDK folder tools and platform-tools to system PATH variable then restarting the device.
#Bolton 's answer worked for me.
Some details...
I got my phone a few weeks ago. I tried the HelloAndroid sample app right away (after installing req'd software, etc.). The app worked in the emulator AND on the phone--right away!
Shortly after that, I rooted my phone but did not flash any roms or kernels. I was only experimenting on the emulator until yesterday (writing a simple notepad app). When I tried debugging the app on the phone, here's what I observed:
Eclipse console reported the "...failed to install on device...(null)" message. BUT
The HelloAndroid app DID get pushed to the phone! (It appeared in the apps drawer AND I was able to launch it.)
It simply would not launch on the phone from the Eclipse run.
I searched around here and elsewhere last night (including this thread) with no luck. Finally, I rebooted my phone--which I never tried (doh!) 'cause I didn't think it would make a difference--and the app launched from an Eclipse start!
Still don't know the cause, but I'll come back here if I figure it out.
I have the same problem: Failed to install test.apk on device 'xxxxxxxxx': null
I try to reboot phone, restart Eclipse, and nothing!
Then, I remove this project from Eclipse workspace, and import again. (File, Import, Existing project to workspace). I do not know exactly what the problem was, but now is working ok.
I ran into the same problem and tried increasing the ADB connection timeout... Didn't work.
I tried putting the "android-sdk/tools" and "android-sdk/platform-tools" in the PATH variable.... No effect.
I tried restarting Eclipse and letting the AVD startup before running. Same problem.
I can sometimes get it to work with a combination of closing and reopening the project, followed by cleaning and rebuilding the project. It doesn't always work, but since I didn't restart the AVD this last time, I think the problem lies within Eclipse itself. You might try deleting everything in the "bin" directory of your project and then cleaning and rebuilding. It might be some temporary or intermediate files not getting deleted properly. Another thing I had to do was delete my AVD. It didn't delete properly, and I had to go in and manually delete the AVD's subfolder and then re-create the AVD. Some combination of these clears the problem up temporarily. Hope that helps.
If unplugging the device and plugging it back in doesn't work, try increasing the upload timeout to something really huge like 20000 ms. It's at Window → Preferences → Android → DDMS → "ADB connection time out (ms)".
Just try the following steps,
Go to Home screen before you start to run the application.
No need to uninstall every time. Just uninstall your application once properly.
Go to Setting -> Manage Application -> click menu -> filter -> Third party application.
Check whether your application is there or not.
After modifying your application just save it. Right click your project and select "Run as Android application".
Note: once again, before running your application check whether or not your emulator is showing the home screen.
going to home screen: from eclipse go to menus: window->android virtual device->start
As for me, I had the same problem and it helped to increase SD volume and max VM app heap size. (Android SDK and AVD manager - Virtual device - Edit)
What is interesting, the back change of SD and heap to the previous values is OK, too. That means, that any change of emulator parameters and its rebuilding is enough. (Simple restart won't help)
I had imported an existing project and started running...
i too was facing the same problem (WARNING: Application does not specify an API Device API version is 11 (Android 3.0) ). After all my attempts to resolve that failed,I just created new project under other package to maintain the same names and copied all the file contents of the previously imporetd projects manually and again started running...to my surprise it successfully executed in my first attempt...i think the problem was due to the lack of compatibilty of versions when imported...i hope it may help few...
I was facing this problem time and again.Got around a lot of forums, but couldn't find a logical solution for the issue.
I used to get this error message,
.
.
.
Uploading test.apk onto device 'emulator-5554'
Failed to install test.apk on device 'emulator-5554': timeout
Launch canceled!
this error is thrown as the start of emulator and deployment of application takes some significant time and before that the emulator times out.
A simple fix for this problem is keeping the emulator open when this problem occurs, *just run the application again. This only deploys the application on to the already started emulator *. There is not much time consumed during this run as the major part of the time during app deployment is because of slow start up of emulator.
Hope this helps!
What Jichao said always works for me.
Generally when I see this error if I am using Eclipse I will close and reopen the program. I will then uninstall the Application from the target phone. This sometimes fixes the issue but not always.
Next I will open up the command terminal and head into the android-sdk then run:
./adb install <AppName>.apk
This does the same thing that running through Eclipse does but it will give you an error message.
(9 times out of 10 it simply says 'INSTALL_ALREADY_EXISTS' and I go and uninstall the application off the target phone again then run adb and I am working fine.)
I was getting the same error.
I Just left the AVD running even after it says "Failed to install *.apk on device-emulator-5554". It automatically loaded the project afterwards.
I think the error comes due the slow start up of the AVD.
I was getting the same errors with my devices.
First be sure that you do not upload debug apk to a device having already installed the same apk but signed with release cert. In this case you've got to uninstall it first from the device.
In other cases my solution is to reboot everything:
reboot device
pskill emulator-arm.exe
pskill eclipse.exe
pskill adb.exe
After that the device, adb and eclipse are working.
When it shows the red writing - the error , don't close the emulator - leave it as is and run the application again.
restart the ADT or Try changing the ADB connection timeout. I think it defaults that to 5000ms and I changed mine to 10000ms to get rid of that problem. If you are in Eclipse, you can do this by going through Window -> Preferences and then it is in DDMS under Android.
OK, this approach will only be useful when you are connecting to a real device rather than to an Android emulator.
Resetting the DDMS ADB connection timeout won't work nicely with a real device when there is a problem with USB debugging mode of the device.
So, disabling and re-enabling USB debugging mode seems to resolve the issue by creating a new fresh ADB session on the device.
go setting- security verify apps if checked, change to unchecked status, then change to checked status
1) remove the apk from this directory project/build/outputs/apk
2) If you using genymotion emulator restart the genymotion
3) make project & rebuild the project
4) Run Again
I'm currently learning how to create android applications so I started with the basic "Hello World" tutorial over at the Android Developers home page. The code is quite simple but when I run it(I'm using Eclipse and a AVD v2.2), it only shows "Android." It does not go to the Home Screen. I updated everything and I still get the same problem. Is there something I did not or
New errors:
[2010-09-29 09:35:04 - DeviceMonitor]Sending jdwp tracking request failed!
[2010-09-29 09:41:50 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2010-09-29 10:16:23 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'
[2010-09-29 10:16:28 - HelloAndroid] Installing HelloAndroid.apk...
[2010-09-29 10:20:27 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!
[2010-09-29 10:20:27 - HelloAndroid] (null)
[2010-09-29 10:20:29 - HelloAndroid] Launch canceled!
I assume you are using the emulator. You have to be patient; it takes a very long time to start up (several minutes.) You can start the emulator manually by going to the Window menu in Eclipse, selecting "the Android SDK and ADB manager," clicking on the emulator you created and then clicking on the Start button. Wait until you see the home screen. If necessary, unlock it by clicking and dragging the mouse down over the screen until it's unlocked.
If you have access to a physical phone and USB cable, you will have a much better (faster) experience overall.
Good luck!
I had the same problem and was bugged by it for two days. but this is what worked for me. one you get this error. try running your project (APP) again. it did the trick for me.
I had done everything. digged the web, installed and re-installed everything 4-5 times including the JDK as well. m not sure if it will help in the long run, but it seems to have worked for me.
As for me, I had the same problem and it helped to increase SD volume and max VM app heap size. (Android SDK and AVD manager - Virtual device - Edit) What is interesting, the back change of SD and heap to the previous values is OK, too. That means, that any change of emulator parameters and its rebuilding is enough. (Simple restart won't help)
Definitely, it is cheaper, than total reinstalling. :-)
unlock the screen from the emulator. That did the trick for me.
go to the run configurations and select target tab. under this tab you can see your targets. then select automatically radio button and select a check box of AVD. then try to run, most probably your issue will be solved.
I had the same problem and this is how I resolved.
if you run
adb devices
I had nothing on the list. So did.
adb kill-server
and
adb start-server
Now if you run the emulator again, the Activity oncreate event will hook properly.
Not sure if this is intended but on the first run on the emulator does not work.
And someone confirm on this?
Thanks.
I had the same problem I was running Android 3.1 Java 1.6 on Eclipse. Just rerun the build process and it kicks in the second time.
I also encountered error when followed instructions, so i ran "adb logcat" which showed that it is not able to find the class.
In the instructions(tutorial) - : It has been said that (during create new project or class)application name set to Hello World and activity name became HelloWorldActivity.
So if you maintain both CreateActivity name and application name both same, then it might work.
I have increased the AVD RAM size to 1024 and VM application to 36 0r 48 or 24.
If anyone getting following error,
[2010-09-29 09:35:04 - DeviceMonitor]Sending jdwp tracking request failed!
[2010-09-29 09:41:50 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2010-09-29 10:16:23 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'
[2010-09-29 10:16:28 - HelloAndroid] Installing HelloAndroid.apk...
[2010-09-29 10:20:27 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!
[2010-09-29 10:20:27 - HelloAndroid] (null)
[2010-09-29 10:20:29 - HelloAndroid] Launch canceled!
Simply restart your application.
Wait for some time.Bcaz it take some time.
when you will get screen with "Data-time-charging-lock",
click on lock .There will be some animation.Again click on same lock.
AND Your Are DONE.You will get output..........
this kept happening to me ... how i solved it was to use " adb install " in a command prompt ...search for adb.exe if its not in your path. Make sure the emulator is running by going to run configuration and hitting run. This starts the emulator without installing your apk file. After the emulator starts up run the command prompt stuff listed above.
I restarted my virtual device with the option Wipe User Data checked and then reran my app. That finally worked for me.
Note that in response to the other comments, I also tried the following:
Simply restarting the device
Restarting the device after changing the VM heap size
Restarting my computer
You might want to try out using Android Studio's AVD. That AVD seems to work better for me.
I am brand new to Eclipse and Android, but somewhat familiar with Java. That having been said, I tried to follow the 'Hello Android' tutorial from the developer site using the latest Eclipse (Galieo) and the 2.1 Android SDK, I am on a Macintosh running Snow Leopard (OS X 10.6). I have a default virtual device (though my target is actually for phones like my own HTC Incredible which has the snapdragon processor and of course all the latest accoutrement in smart phones).
Everything seemed to go okay until I went to RUN>RUN and then selected 'Android Application'. My computer spins its wheels for a while and then I see two errors. I have pasted the output from Eclipse below:
[2010-05-04 01:53:46 - HelloAndroid] ------------------------------
[2010-05-04 01:53:46 - HelloAndroid] Android Launch!
[2010-05-04 01:53:46 - HelloAndroid] adb is running normally.
[2010-05-04 01:53:46 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch
[2010-05-04 01:53:46 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'myAVD'
[2010-05-04 01:53:46 - HelloAndroid] Launching a new emulator with Virtual Device 'myAVD'
[2010-05-04 01:53:58 - HelloAndroid] New emulator found: emulator-5554
[2010-05-04 01:53:58 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2010-05-04 01:53:59 - Emulator] 2010-05-04 01:53:59.501 emulator[10398: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.
[2010-05-04 01:54:23 - HelloAndroid] emulator-5554 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!
I never do see the text in the emulator and the emulator crashes with a message about it quitting unexpectedly.
The crash report states:
Process: emulator [10472]
Path: /Applications/android-sdk-mac_86/tools/emulator
Identifier: emulator
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: eclipse [10468]
Date/Time: 2010-05-04 02:25:41.153 -0500
OS Version: Mac OS X 10.6.3 (10D573)
Report Version: 6
Interval Since Last Report: 2558914 sec
Crashes Since Last Report: 4
Per-App Crashes Since Last Report: 2
Anonymous UUID: C5F178C1-5290-4CA9-AD6E-E9C4F5582754
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000001fd2f000
Crashed Thread: 3
NOTE: Running the emulator from the command line with:
iainnitro-Mac:tools iainnitro$ ./emulator -avd myAVD
2010-05-04 02:49:23.011 emulator[10556: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.
Segmentation fault
iainnitro-Mac:tools iainnitro$
yields a segmentation fault(as noted above from the terminal output). So the emulator is dying on its own before anything can be shown.
I have tried restarting the ADB processes.
The actual code is line by line from the tutorial and I have never been able to get to the XML part yet.
I am not sure what is wrong with my environment setup or if it is just an incompatibility with Snow Leopard? I would REALLY appreciate any help in resolving this as I am very interested in developing on this platform.
Thank-you,
Mike N Lawrence, Kansas
No direct experience, but this seems to be a recurrent issue:
This thread suggests:
You haven't let the emulator boot all the way up. Start it then wait until you see a desktop, just like on a real phone.
This one mentions (I suspect point 1. is not a concern for you):
Get more RAM. I was running on 256 MB (which I believe is below minimum requirements), just upgraded today to 1024 MB (long time coming), application now starts fine. Although I still do see some error messages in the emulator, they don't seem to actually do anything.
Install from command line. This is a bit laborius, but you can launch an emulator from the command line (assuming <android sdk path>\tools is added to your PATH variable) just type emulator, then browse to the location of your_app_here.apk, and execute
adb install your_app_here.apk
If you launch the emulator from Eclipse, execute adb kill-service and then adb start-service first (or kill-server / start-server. not sure the exact commands). Then your app will be installed on the emulator.
Also (a bit old but might still be relevant)
Maybe the emulator is running so slow, and the adb server, or another component like "DDMS" is a little "desperate" because seems it's waiting to the emulator to iniatialize the some HOME aplication.
But the emulator is running slow, the console in Eclipse send a message: emulator-5554
disconnected! Cancelling 'com.android.hello.HelloAndroid' launch!; and the emulator continues running normally and boot it's system, but don't run application that I build.
So for that problem I run program, and when the emulator is opened, I go back to eclipse in DDMS Perspective and in the Device tab y press a button "restart adb server" before the console shows me the message of "emulator-5554 disconnected!".
I do it several times until the emulator finally boot the OS.
After booted the OS on the emulator, eclipse don't send that disconnect error, and "sends" the app that I've built, also the console shows messages about this.
Then finally appears on the mobile "Hello, Android".
There has been a discussion on this with two proposed solutions
http://code.google.com/p/android/issues/detail?id=724
Comment 17 by zachrcrowe, Jan 06, 2010
FYI - I had to change a line in the Hello Android example to read
this.setContentView(tv); in order for it to work. As mentioned above, the deprecation
warning shouldn't affect the functionality of the emulator.
Comment 18 by mfrony, Jan 14, 2010
I had the same problem when I ran the Hello Android example. The way I solved it and
could run my first Android code was by changing the Project Build Target from 1.1 to 1.5.
This seems to be a timing issue. For some reason Eclipse attempts to load the application on to the emulator before it is "ready". I'm not sure why this occurs but I did find a work around: just start the emulator from the command line before you run the application.
Start clean by closing Eclipse (maybe the OP didn't exit Eclipse before he tried to run via the command line?)
Start the emulator via Terminal by navigating to the android-sdk-mac_86/tools directory and typing:
./emulator -avd my_avd
Open Eclipse and attempt to run the tutorial again using the same steps as before
A dialog box should open asking whether you would like to start a new AVD or use the one that is already running--choose to use the one that is already running.
what i did was to move the circle that appears when the AVD launches to the unlock position, and there it was 'Hello, Android'!
I had this same problem when I tried to run the emulator using a 4.0 AVD. It used to crash at the bootup screen and show 'Segmentation fault' in the console. I was able to fix it by increasing the SD card size of the AVD to 1GB from 32MB.
For whatever reason, I stopped getting the segmentation fault when I added:
this.setContentView(tv);
the 'this' seemingly solved the issue. The seg fault happens if you try to run the emulator without any .apk file I assume. (I was getting that from the command line as well). I hope the tutorial will be updated.
See Related post
Another related post
This worked on Linux for me:
Run Emulator (Wait for the home screen of the Emulator to load)
Click Window > Open Perspective > DDMS
In Devices Panel, click on drop down menu > Reset adb
Run project
I am new to Android. Follow the HelloAndroid Tutorials by use Eclipse.
After run HelloAndroid, the AVD 'xian_avd2' lunched, but stop there, no " Hello, Android"
displayed on AVD. Looks like Waiting for HOME ('android.process.acore') to be launched...
Not know how to resolve this, please help.
Thanks
wang813
[2010-01-29 00:12:13 - HelloAndroid]------------------------------
[2010-01-29 00:12:13 - HelloAndroid]Android Launch!
[2010-01-29 00:12:13 - HelloAndroid]adb is running normally.
[2010-01-29 00:12:13 - HelloAndroid]Performing com.example.helloandroid.HelloAndroid activity launch
[2010-01-29 00:12:13 - HelloAndroid]Automatic Target Mode: Preferred AVD 'xian_avd2' is not available. Launching new emulator.
[2010-01-29 00:12:14 - HelloAndroid]Launching a new emulator with Virtual Device 'xian_avd2'
[2010-01-29 00:12:37 - HelloAndroid]New emulator found: emulator-5554
[2010-01-29 00:12:37 - HelloAndroid]Waiting for HOME ('android.process.acore') to be launched...
[2010-01-29 00:13:59 - HelloAndroid]emulator-5554 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!
Open Android Virtual Device Manager
select the AVD you use for your app.
Press the start button and wait for a new form to show up called (Launch Options).
Check the box "Wipe user data" and hit "Launch" button.
This should work.
--- OR ---
Open Android Virtual Device Manager
Delete the AVD you use for your app.
Create an new AVD.
Start your new AVD.
This should also work.
The problem as I discovered lays in the fact the the project has no appropriate Virtual Device defined for it in the AVD manager.
So the recommended steps in eclipse are:
Go to "Project"-> Properties-> Android.
On the right pane see what line is checked in the Project build target.
Remember the target platform number that appears in the selected line.
Go to "Windows"-> AVD Manager.
Check the list of existing Android Virtual Devices for a device that matches the Platform and API level that you have set for your project (see step #2 above).
If there is no line that includes an AVD for your platform (as I suspect), add it using the "New" button.
A "Create New Android Virtual Device" window will be opened. set a new device name. in the "Target" selection box choose the right platform for your project.
Enjoy your emulator once again!
Try to use the command emulator -avd emulator_name -wipe-data
I had a similar problem -- it ended up I wasn't waiting long enough for the emulator to run the OS before trying to install the app. Launch the emulator and then wait for the home screen to appear before running the app in Eclipse.
Maybe it's an AVD problem for existing machine. Try to create a new AVD from the AVD Manager and delete the old one.
This can happen on slow computers when the emulator doesn't start in time. When it eventually does start, it is no longer connected to ADB. The solution is to restart ADB so that it reconnects to the emulator. You can do this by executing the following in command line:
adb kill-server
adb start-server
For me, I believe it happened due to an unexpected power failure while the emulator was running. Having it not shut down properly meant that my session was still cached. (I would occasionally get these errors too):
[2012-06-08 05:05:06 - Emulator] WARNING: Data partition already in use. Changes will not persist!
[2012-06-08 05:05:06 - Emulator] WARNING: SD Card image already in use: C:\Users\Ben\.android\avd\Ben-Android.avd/sdcard.img
[2012-06-08 05:05:06 - Emulator] WARNING: Cache partition already in use. Changes will not persist!
If this happened to you, pull up the command line, navigate to your android-sdk\tools and follow the corrected top post: emulator -avd emulator_name -wipe-data
I resolved it (Mac) by following these steps,
Run Emulator
Keep the Emulator, (no matter same error occurs)
Make Sure the Home Screen of Emulator is appeared
go to Window -> Show Perspective -> DDMS --> In Devices Panel -> on Corner Drop Down Menu -> Reset adb
I Hope it helps
for me didn't worked:
./emulator -noaudio #androidDev1
so I used:
./emulator #androidDev1
and it worked perfectly! :)
Also check Eclipse IDE:
Windows->Preferences->Android->Launch->Options
It should be empty
I was having the same issue, I deleted my AVD and created afresh - after that I do not see such problems.
also same problem for me..
go to DDMS perspective-->select Device-->go to Window-->Navigation-->Show view menu-->reset adb..
it works for me.
Disable snapshot and don't use it. It is what solved this issue in my case
delete the avd and create another helped me
Try 1 more time. If it occurs again
Goto Project->clean and
Right click your project and choose refresh..
This worked on Linux for me:
Run Emulator (Wait for the home screen of the Emulator to load)
Click Window > Open Perspective > DDMS
In Devices Panel, click on drop down menu > Reset adb
Run project
It comes down to just making a new AVD with moderate settings, at least that's what fixed it for me. Though every time I close it I have to make a new one. Guess just wait for a patch.
Click Android Device Manager button on the second toolbar.
Click New.
Set up a mid-range device, basically just select a phone model from the middle of the list that isn't a tablet. The memory should fill it self in, then just put like 20mb for the SD card.
Click Start. The AVD will now start up and load the Android OS.
Then Run your app on said device.
Once you get this problem it seems to remain unless you do a full reinstall... Basically, always start the AVD first, let it hit the android home screen, then run your app. This way Eclipse doesn't overload the sluggish emulator.
And I got the solution from here. It perfectly works for me.