19

i got this problem that is annoying me after updating to 1.3 , i fired up Android Studio and got a message saying :

***Unable to establish a connection to adb This usually happens if you have an incompatible version of adb running already. Try reopening Android Studio after killing any existing adb daemons. If this happens repeatedly ,please file a bug at http://b.android.com including the following :

  1. Output of the command 'C:\Users\username\AppData\Local\Android\sdk\platform-tools\adb.exe devices'

2.you Idea.log file (Help |Show log in explorer)***

Whats the solution ,i'm running Win7 32bit

Anas Tawtaw
  • 323
  • 1
  • 2
  • 9

5 Answers5

21

You need to kill the adb process that is running, to do so,

  1. Go to Spotlight search, open Activity Monitor,

  2. Loop for adb under CPU tag,

  3. Now Select it and Force Quit the process.

You can kill adb process through Terminal command too, by simply typing Kill -9 adb

Note: Sometimes When u tried to force close them they kept restarting. Make sure you quit any emulators and disconnect any devices to avoid any mistake.

PN10
  • 1,888
  • 3
  • 23
  • 34
  • 2
    There were 3 adb instances shown in my activity monitor. When I tried to force close them they kept restarting. Make sure you quit any emulators and disconnect any devices to avoid my mistake. – yongsunCN Jul 05 '16 at 14:21
  • Thanks @yongsunCN...I think I should make note of this in my answer...for helping others stuck with same issues – PN10 Jul 06 '16 at 10:58
  • Although this answer solves the problem it doesn't prevent it happening again. I ran into this issue frequently after upgrading android studio to 2.1.2. I'm hoping anyone is able to provide a more specific solution to explain what causes this issue and how to prevent it in the future. – yongsunCN Jul 06 '16 at 14:29
  • what release channel u are using for android studio? – PN10 Jul 07 '16 at 10:17
  • @yongsunCN I would suggest you to always use stable release channel for android studio....You can try out few things:Turn off 'instant run' feature P.S. after turning it off, do not forget to do a full clean/rebuild to get rid of instant run artifacts. if this doesn't work I would suggest You to moving back to AS previous version that was working fine.Hope this helps....For more details check out this link https://code.google.com/p/android/issues/detail?id=200910..AS 2.0 and above issue is already reported ..but there are no specific solution to this problem yet all u can do try n check... – PN10 Jul 07 '16 at 10:34
  • 2
    I was using Genymotion Simulator. I quit out of Genymotion and then quit out of Android Studio, then I went to the Activity Monitor and Force Quit out of Android Studio (the X in the top left of Activity Monitor) and that solved my problem. Credit to PN10 – Ryan Cocuzzo Jul 19 '16 at 22:25
  • @Ryan I m glad ....thank you for appreciating...happy coding..!!! – PN10 Jul 20 '16 at 04:52
  • 1
    I had a weird variation of this issue on Mac OS. Killing the ADB deamon and restarting Android Studio didn't help at all. When I inspected the "Event Log" pane in Android studio, I realised that Android Studio was attempting to connect to ADB on a host different from my local machine. Disabling WI-FI and killing / restarting the ADB deamon and Android Studio, while the network adapter was disconnected, finally fixed the issue for my part. – Schm1 May 31 '18 at 09:02
  • @Schm1 Actually this solution is for windows users...op has specifically mentioned in question .. glad u figured it out yourself...post your answer for MacOs people...this might help some.. – PN10 May 31 '18 at 13:14
  • @PN10 Sorry, you're absolutely right. I've posted the comment on a Mac Os related thread now. – Schm1 Jun 01 '18 at 14:24
  • What is spotlight search tough – Yusuf Çağlar Jun 07 '18 at 10:29
6

I spent around a complete day to look for the solution but couldn't find an exact one. Finally what i did was that I uninstalled my antivirus and after that it worked like a charm. So, here I shortlist the steps to check whether you are solving for the correct problem or not:-

  1. Run command prompt and set path to where adb.exe file is present. (In most of the cases it's found at C:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools)
  2. Type adb start-server and press enter.
  3. If there is an error displayed saying something like "Cannot connect to daemon" , then you must look in your antivirus for firewall settings and add the path to its exceptions or you can simply uninstall your antivirus.
Damanpreet Singh
  • 678
  • 10
  • 15
3

In tools menu,Android-> untick enable adb Integration and Then OPEN widows task manager n manually end process adb.exe This also solved my issue as der were multiple adb.exe running.

PN10
  • 1,888
  • 3
  • 23
  • 34
1

Restart the computer. Now, disconnect the device, connect it, Make sure USB debugging Option is enabled. Now, pull navigation drawer and select the option USB for file transfer. In the dialog; there are few options such as ;

  1. Transferring media files
  2. Transferring images
  3. Connecting MIDI devices
  4. None

select None and now select Transferring media files.

Now, check Android studio, and select Android Monitor and check whether device is attached or not. Thank you !! I hope it helps for your problem.

Zoe
  • 27,060
  • 21
  • 118
  • 148
Swift
  • 271
  • 3
  • 13
0

This happened to me after upgrading to Windows 10. I got the same error you did, but what was helpful was the extra message about not finding the adb version in the very bottom left corner of the Android Studio screen. That led to this: Solution: How to Fix Android Studio’s ‘Unable to Obtain Result of Adb Version’ Error

In short, it was a problem with my Avast firewall blocking the connection. I added the sdk and Android Studio paths to my firewall exception list and it worked!

Elliptica
  • 3,928
  • 3
  • 37
  • 68