Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 484
Otra Avatar asked Jul 12 '11 16:07

Otra


2 Answers

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.

like image 163
Alexey Vassiliev Avatar answered Oct 22 '22 00:10

Alexey Vassiliev


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.

like image 28
Dipin.K.G Avatar answered Oct 22 '22 01:10

Dipin.K.G