Eclipse DDMS not showing Emulator on restart [duplicate]
I'm running Eclipse: Helios. Here's the issue. When I leave my Android Emulator running for about 20 minutes while I'm programming, if I try to install and run my application, I receive this error in the console:
[2011-07-12 12:27:55 - DatePrinter] Failed to install DatePrinter.apk on device 'emulator-5554': Connection refused: connect
[2011-07-12 12:27:55 - DatePrinter] java.net.ConnectException: Connection refused: connect
[2011-07-12 12:27:55 - DatePrinter] Launch canceled!
If I close the emulator and run the project again, a new emulator launches and the console shows the emulator starting but the app does not install and the emulator does not show up in DDMS.
If I go to the terminal and type in adb devices
, I get this error message
ADB Server didn't ACK
*failed to start daemon*
error cannot connect to daemon
The only way I can fix it that I've found is to close eclipse, kill the adb.exe process and restart eclipse.
Any ideas what could be causing this error/how to debug it?
Edit: Starting the emulator through SDK manager does not yield any positiv开发者_运维技巧e results either.
Edit 2: Running adb kill-server and adb start-server yields the same message "ADB Server didn't ACK" although it prints a "daemon not started, starting it now on port 5037"
right before that.
Though I did not have the same problem as you did. In case of connectivity problems with emulator and Eclipse I use the following:
In the DEVICES window of Eclipse (DDMS perspective) drop down menu (in the upper right corner of the window) select "Reset ADB".
This solves most of connectivity problems, which otherwise will require restart.
Try this
adb kill-server
adb start-server
Check whether adb path has been added to environment variable, otherwise try to re-install the SDK itself.
I had the same problem. In the folder C:/../android-sdk/platform-tools
, the following commands didn't work.
adb kill-server
Did nothing, and
adb start-server
resulted in an error.
So I killed the adb process with the task manager and used adb start-server
again. And it works.
Here is a way to do it:
- Open Task Manager
- Select
adb
and end the process - Go to Eclipse and reset adb
- Run your app
Check your Anti virus program control dialogs e.g Norton Antivirus and ZoneAlarm 2010.
Make sure that
eclipse.exe
emulator.exe
emulator-arm.exe
have input and outbound and network connections!
精彩评论