10

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.

Community
  • 1
  • 1
Otra
  • 8,108
  • 3
  • 34
  • 49

5 Answers5

5

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.

Alexey Vassiliev
  • 2,349
  • 2
  • 17
  • 8
2

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.

vinoth
  • 49
  • 7
Dipin.K.G
  • 127
  • 10
0

Here is a way to do it:

  1. Open Task Manager
  2. Select adb and end the process
  3. Go to Eclipse and reset adb
  4. Run your app
Moshe Katz
  • 15,992
  • 7
  • 69
  • 116
Alok
  • 1
0

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.

Jason Plank
  • 2,336
  • 5
  • 31
  • 40
Dsandre
  • 312
  • 1
  • 5
  • 14
  • If you look at my question, I'm fully aware of that solution. I'm asking how to prevent it and what the cause is. – Otra Aug 02 '11 at 12:46
-2

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!

peter_pilgrim
  • 1,160
  • 11
  • 18