66

I have installed Android Studio. Then I have updated the Android SDK. Now when I start Android Studio, this message pops up:

ADB not responding. You can wait more,or kill "adb.exe" process manually and click 'Restart'

The dialog has 3 options: Wait more, Restart and Cancel. But all of them gives me the same result, i.e. a message Waiting for ADB appears and I can't do anything with Android Studio.

I have to kill the program using windows task manager! I'm using windows 7.

Can anyone help me on this?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
DanGizz
  • 761
  • 1
  • 5
  • 3

20 Answers20

59

Go to

Tools > Android > (Uncheck) Enable ADB Integration (if studio hangs/gets stuck end adb process manually)

then,

Tools > Android > (Check) Enable ADB Integration

dudego
  • 896
  • 9
  • 9
44

On my macbook pro, i was occasionally getting this in Android Studio. The following resolved it for me:

Open up a Terminal and, instead of using 'adb kill-server', use this:

$ killall adb

wait a minute and it looks like Android Studio automatically restarts adb on it's own.

Gino
  • 1,593
  • 17
  • 22
  • 1
    This worked great. I typed `adb devices` afterwards and the server started up and android studio logcat was fixed. – Nick Oct 23 '14 at 13:26
  • This is the simplest solution. Android Studio isn't smart enough to do this, so it has to be done in terminal. This should be the accepted answer, and I wonder why OP @DanGizz didn't mark this as solved. – IgorGanapolsky Sep 09 '22 at 16:56
26

From the command prompt run the command adb kill-server. This will shutdown ADB and android studio or Eclipse if you were to use that, would show Waiting for ADB as you said.

Once ADB has shutdown down run adb start-server or run adb devices which will automatically start the adb service and show that your android emulator or development devices has successfully connected.

Boardy
  • 35,417
  • 104
  • 256
  • 447
  • 1
    I have tried exactly that. I also changed my environment path variable from my old ADT location (C:\adt-bundle-windows-x86_64-20130219\sdk\platform-tools) to my new Android Studio (C:\Program Files (x86)\Android\android-studio\sdk\platform-tools) location. But it doesn't help. The console says *deamon not running. start it now on port 5037* *deamon started successfully* but Android Studio remains still stucked with the pop up message. – DanGizz Aug 06 '13 at 13:24
  • I don't know too much about Android Studio but it is a very early release so likely to be buggy. Have you tried Eclipse, do you still have the same issue. It may be worth checking the SDK manager and ensuring that all components are up to date. – Boardy Aug 06 '13 at 13:32
  • Yes, I used eclipse before, which I find it also kind of buggy sometimes. But after watching this presentation form Google I/O http://www.youtube.com/watch?v=lmv1dTnhLH4&list=PLWz5rJ2EKKc9WGUwq2gQ-coU3fSyexgOx&feature=player_embedded this guys kind of convinced me I should switch to IntelliJ's Android Studio. But you're right it's still on an early release so maybe I shouldn't expect too much from it. – DanGizz Aug 06 '13 at 13:47
  • Yea I did try Android Studio a while ago on the 0.01 release and kind of gave up with it until it becomes stable, but you are right Eclipse does have some odd bugs as well. Have you tried eclipse since you've had this problem with ADB with Android Studio or does the problem go away with Eclipse. If so, may need to reach out to the Google support forum, assuming there is one somewhere – Boardy Aug 06 '13 at 13:50
  • This was the solution for me on Android studio windows 8 thank you – Salam El-Banna Nov 07 '15 at 13:08
7

If you are suffering from "ADB not responding. If you’d like to retry, then please manually kill ‘adb’ and click ‘Restart’ or terminal appear Syntax error: “)” unexpected" then perhaps you are using 32bit OS and platform-tools has updated up 23.1. The solution is to go back to the platform-tools 23.0.1.

You can download the platform-tools 23.0.1 for Linux here , for windowns here and Mac here

After the download, go to your sdk location > platform-tools folder to delete old platform-tools in sdk and paste down into the downloaded one.

Woohooo ... it should work.

This is a bug with latest ADT.

Ali Ashraf
  • 1,841
  • 2
  • 24
  • 27
  • Thank you so much! This was killing me. Where do you find the links for these platform-tools in general. Just want to know in case I run into something like this again. – b.lyte Jun 21 '16 at 20:40
  • The link (windows) seems to be broken. – meyasir Oct 23 '18 at 07:51
6

Check if any service is listening on port 5037, and kill it. You can use lsof for this:

$ lsof -i :5037
$ kill <PID Process>

Then try

$ adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *

This solved my problem.

serj
  • 508
  • 4
  • 20
jorgesuarezch
  • 306
  • 2
  • 5
6

For me, on Windows 7, killing the ADB server and restarting it via command line did not help. It would not start up successfully.

>adb kill-server

>adb start-server
* daemon not running. starting it now on port 5037 *
ADB server didn't ACK
* failed to start daemon *

So killing the adb.exe process via Task Manager was actually the easiest solution that case.

mschwaig
  • 551
  • 6
  • 19
  • I did not see that adb.exe in Task Manager. What else i can do? – iSrinivasan27 Feb 18 '16 at 05:24
  • Looking at [this](http://stackoverflow.com/a/33953214/2066744) answer to another question I would think that maybe you just don't have `adb` in your path at all. In that case you would have to add it to your path. – mschwaig Jul 08 '16 at 21:45
5

I run netstat -nao | findstr 5037 in cmd.

enter image description here

As you see there is a process with id 3888. I kill it with taskkill /f /pid 3888 if you have more than one, kill all.

enter image description here

after that run adb with adb start-server, my adb run sucessfully.

enter image description here

Kaveh Safavi
  • 499
  • 6
  • 5
4

I ran into this problem and tried a number of solutions on my Mac without any success. I finally got to work with the commands below:

$ rm -rf ~/.android
$ killall adb
$ adb devices

Note that rm -rf ~/.android will remove any AVDs that you have configured, so don't take this step lightly. Personally I had to though and I'm not sure why. Hopefully this helps someone.

TJ VanToll
  • 12,584
  • 4
  • 43
  • 45
  • This answer doesn't seem to apply to Windows, which is what the OP said his/her OS was. Or am I missing something? I have cygwin, but killall doesn't seem to come with it. – dcp Apr 10 '18 at 16:50
  • See my answer for a way to kill all adb processes with one command on windows. – dcp Apr 10 '18 at 17:11
4

This issue could be because adb incompatibility with the newest version of the platform SDK.

Try the following:

  1. If you are using Genymotion, manually set the Android SDK within Genymotion settings to your sdk path. Go to Genymotion -> settings -> ADB -> Use custom SDK Tools -> Browse and ender your local SDK path.

  2. If you haverecently updated your platform-tools plugin version, revert back to 23.0.1.

Its a bug within ADB, one of the above must most likely be your solution.

Jaydev
  • 1,794
  • 20
  • 37
3

1.if your phone system is over 4.2.2 , there will be enter image description here

2.disconnect the USB and try again or restart your phone

3.After after all try , it didn't work. It may be a shortage power supply so try other usb interface on your computer.

I solved the problem doing the first step . anyway have try.

einverne
  • 6,454
  • 6
  • 45
  • 91
  • I had to wait for a pretty long while before a Philips with Android 5.1 showed this dialog. I also did play with connection modes (charge/disk/etc) but of course have no idea which one has helped and if it helped at all. – 18446744073709551615 Jan 30 '16 at 11:49
3

If you need to kill all adb processes on windows with one command, you can do it as follows:

taskkill /F /IM adb*
dcp
  • 54,410
  • 22
  • 144
  • 164
  • The command is valid and shows the result that `adb has been terminated`, but didn't work when actually I'm trying to connect my device to the android studio. – meyasir Oct 23 '18 at 07:48
2

I had this problem and solved it by this way... I had a app in my pc that used adb... I tried to disable it but still my android studio's adb had problem after unistall that application and problem solved.

S Rakhshy
  • 21
  • 4
1

I had the same problem. I have restarted ADB in any possible way, I have killed the process and restarted the PC with no results.

Then I found this plugin. Just download and install it in your Android Studio IDE. Under Tools -> Android you have a menu ADB Idea. Here you can kill, start, restart, clean ADB.

honk
  • 9,137
  • 11
  • 75
  • 83
etudor
  • 1,183
  • 1
  • 11
  • 19
1

None of the above helped me completely. Although Oventoaster made me think. I had a couple of adb on my system. Removed them almost all.

I am running android studio on ubuntu 14.04 64 bit.

So I checked manually /home/xxxxx/Android/Sdk/platform-tools/adb

where xxxxx was my linux username

this gave

/home/xxxxx/Android/Sdk/platform-tools/adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

https://stackoverflow.com/a/27415749/4453157

solved it for me.

Community
  • 1
  • 1
Stefan Verhagen
  • 303
  • 3
  • 7
1

If the above CMD command option is not working and you cannot make it work in any other way then follow this below.

Click on below link

http://adbshell.com/downloads

and download the first link with name ADB Kits ( contains adb.exe and necessary .dll files).

After downloading replace these files with the ones in the path

Android/Sdk/platform-tools/

Now click on adb.exe and it will open cmd and will start the adb server.

Now it will detect the device and no problem. OOOOOllllaaaaa.....

If the Problem persists again then do the same... save the folder somewhere.... just replace files... it will detect the device automatically then

sHaRkBoY
  • 481
  • 4
  • 8
0

I had this problem on Windows 8, but I solved the problem by updating all of Android Studio's plugins with the SDK Manager, then restarting the computer.

Oventoaster
  • 299
  • 1
  • 5
  • 13
0

An another one: you might want to avoid running Eclipse and Android Studio together, it helped me.

MartijndeM
  • 146
  • 1
  • 9
0

I had this problem on Windows 7. My situation is this through SDK Manager. I only download API 19 but I had not downloaded related Android SDK build-tools. So it occur this problem.

I went through SDK Manager download build-tools 19 to fix it. Hope to give you help.

Robert
  • 5,278
  • 43
  • 65
  • 115
bony
  • 3
  • 2
0

Faced this issue on Mac:

I have tried different solution, But below works for me -

  1. Uninstall "Vysor" plugin if you have installed for Chrome
  2. Under Home folder > find .Android folder and move to trash
  3. Goto, Android sdk > delete/move to trash platform-tools folder
  4. Again install/download from Android SDK Manager
  5. Open terminal -
    • adb kill-server
    • adb start-server
  6. Check adb devices, It will work and display you all connected devices.

Hope it helps !

0

there seems to be about a million reasons this bug happens, but for me (running on ubuntu), it was openvpn running in the background that caused it.

I killed the openvpn service and no more issues.

DevDonkey
  • 4,835
  • 2
  • 27
  • 41