64

Possible Duplicate:
The connection to adb is down, and a severe error has occured

I am currently trying to develop an application for Android in the latest release of Eclipse. When I try to build and run, the following comes up:

[2011-02-17 17:08:03 - <ProgramName>] The connection to adb is down, and a severe error has occured.
[2011-02-17 17:08:03 - <ProgramName>] You must restart adb and Eclipse.
[2011-02-17 17:08:03 - <ProgramName>] Please ensure that adb is correctly located at 'C:\<sdk-directory>s\platform-tools\adb.exe' and can be executed.

Now, I have updated the ADT plugin, I have the latest version of the Android SDK; adb.exe is, in fact, in the platform-tools directory and can be executed. I've tried everything I found on Google:

  • I tried adb kill-server and adb start-server
  • I tried to run it with an without an emulator started
  • I have the given directory in my PATH (I tried with just the platform-tools in the path and I tried with having both platform-tools and tools in my PATH).

Notes: I am running Windows 7. Also, I have previously tested apps in Eclipse. This error is new to me since upgrading the SDK.

Community
  • 1
  • 1
ariets
  • 4,218
  • 4
  • 28
  • 34
  • Have you tried restarting Eclipse? Sometimes my adb crashes (windows) and I get a "Program not responding" Error. Only solution for me is to restart eclipse – f20k Feb 17 '11 at 22:41
  • Yes. I have restarted it multiple times. – ariets Feb 17 '11 at 22:57
  • I just noticed that my SDK is not in the Program Files directory, that it is in my "Documents" directory. Could this be a cause of the problem? – ariets Feb 17 '11 at 22:59
  • Perhaps your antivirus has blocked `adb.exe`. Try to rename the folder you have installed the SDK. The next eclipse starts it will ask you where the SDK is. – salehm.movahedi Mar 07 '12 at 10:39
  • 2
    I just cleaned my project and was good to go. – Behnam Oct 14 '13 at 05:27

11 Answers11

116

I just got the same problem and to fix it, I opened the task manager and killed the adb.exe process, then I restarted Eclipse.

Lorenzo Polidori
  • 10,332
  • 10
  • 51
  • 60
flowoverstack
  • 1,218
  • 1
  • 9
  • 6
  • 5
    Did it without even restarting Eclipse, just unplugged the phone and plugged it back in. – Radu Sep 14 '12 at 12:48
  • 2
    I tried everything until I saw this answer. Just cleaning fixed the problem. I'd give you a hundred upvotes if I could. thanks! – Jim In Texas Jan 30 '13 at 23:34
  • For those who can't run, even after restarting and cleaning. go to the /sdk/platform-tool/ via terminal, to make adb tool executable write `sudo chmod 777 adb`. It`s helped me, good luck. – Arthur Kushman Apr 29 '13 at 04:38
  • 1
    I dont have that service runned on my system. why? :( – Mahdi Mar 01 '14 at 10:08
20

Reinstall everything??? no way! just add the path to SDK tools and platform tools in your classpath from Environment Variables. Then restart Eclipse.

other way go to Devices -> Reset adb, or simply open the task manager and kill the adb.exe process.

Jorgesys
  • 124,308
  • 23
  • 334
  • 268
15

I restarted eclipse and did the Project -> Clean -> select your project One of them fixed my problem with adb

[2011-12-31 10:50:45 - HelloAndroid] Android Launch!                      good

[2011-12-31 10:50:45 - HelloAndroid] adb is running normally.             good

[2011-12-31 10:50:45 - HelloAndroid] Could not find HelloAndroid.apk!     bad

Thanks for the help. On to the next problem (sigh)

R.daneel.olivaw
  • 2,681
  • 21
  • 31
user1123966
  • 208
  • 2
  • 5
7

Sounds a bit familiar with my problem: aapt not found under the right path

I needed to clean all open projects to get it working again...

Community
  • 1
  • 1
WarrenFaith
  • 57,492
  • 25
  • 134
  • 150
5

I had exactly the same problem with you. And after two days wondering why this occurs to me, I finally got through this by moving the adb.exe from the unreliable software list of the COMODO anti-virus to its reliable software list. At that time, I had tried at least 5 kinds of measures to make the adb work, including all above...

DarKeViLzAc
  • 208
  • 1
  • 7
  • solve the problem for me http://stackoverflow.com/questions/4072706/the-connection-to-adb-is-down-and-a-severe-error-has-occured – Adeem Maqsood Basraa Mar 19 '11 at 14:23
  • 1
    Thanks for the COMODO tip. What worked for me was from COMODO -> Defence+ -> ViewActiveProcessList right click on adb.exe and emulator-arm.exe and select "Add to Trusted Files". Then kill those processes and restart eclipse. –  Jan 17 '14 at 22:28
3

The problem might be with your firewall or antivirus.

  1. Disable all network connection
  2. Disable firewall
  3. Disable Antivirus

Make sure they all disabled.

Run your script in Eclipse. If it works, then 2 and 3 might be the culprit. For me, it was comodo firewall. I created a filter for Adb.exe

Josh Darnell
  • 11,304
  • 9
  • 38
  • 66
Arvin
  • 31
  • 1
3

I had a similar problem with adb.exe and Eclipse last time I updated ADT plugin. The solution was to run Eclipse as administrator and reinstall ADT.

pegel
  • 162
  • 1
  • 4
  • Okay, so I shut down Eclipse and then ran it as administrator. I uninstalled the ADT, and then re-installed it. Still getting the same problem. – ariets Feb 17 '11 at 22:56
1

For me the following worked:

  1. Kill adb.exe from Task Manager

  2. Restart Eclipse as administrator

  3. For my app, the target was Google APIs level 10.. I went to Window-> AVD Manager and the entry for "Google APIs level 10" had a broken instead of a green tick - so I just clicked the entry and clicked the "repair" button and problem was fixed

(It was probably only 3 above..)

sami
  • 723
  • 2
  • 9
  • 23
0

It's also possible to get this error if you are running the test project using JUnit instead of Android JUnit. Naturally, the solution is just to change how you run it.

Ceasar
  • 22,185
  • 15
  • 64
  • 83
0

Judging from what you've posted, and assuming it's not a typo, Eclipse is looking in C:\s\platform-tools...

If that's the case, then you should check Eclipse's Window/Preferences/Android option for the SDK Location. Maybe yours is set to "C:\s". You can't edit it to be a value such as that without causing an error, but maybe it's got corrupted somehow.

NickT
  • 23,844
  • 11
  • 78
  • 121
  • The SDK location is pointing to the root of my SDK on my device. I tried to edit it to see if setting it to the platform-tools location would work, but it would not allow me (as I expected). However, the error message stated: "_Could not find folder 'tools' inside...[directory]_" Is it suppose to say tools? Or something else? Thanks! – ariets Feb 25 '11 at 22:12
  • @NickT: Eclipse does not have issues finding the android SDK if you point it to the right directory. – IgorGanapolsky Dec 22 '11 at 17:17
0

The connection to adb is down, and a severe error has occured.

[2011-12-19 11:45:09 - RayhReport] You must restart adb and Eclipse.
[2011-12-19 11:45:09 - RayhReport] Please ensure that adb is correctly located at 'D:\android-sdk-windows\tools\adb.exe' and can be executed.

When you go to D:\android-sdk-windows\tools\adb.exe path then you see the text file,the name of file is "adb_has_moved" thats means your adb.exe is moved to platform-tools copied down the adb.exe and paste in tools folder and run it. I'm sure it works.

Juan Sosa
  • 5,262
  • 1
  • 35
  • 41
Yogesh Tiwari
  • 149
  • 1
  • 4