Android Studio ADB connection error [duplicate]

2019-03-19 04:00发布

This question already has an answer here:

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

5条回答
Explosion°爆炸
2楼-- · 2019-03-19 04:20

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.

查看更多
贼婆χ
3楼-- · 2019-03-19 04:21

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.

查看更多
做个烂人
4楼-- · 2019-03-19 04:27

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!

查看更多
爷的心禁止访问
5楼-- · 2019-03-19 04:31

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.
查看更多
我欲成王,谁敢阻挡
6楼-- · 2019-03-19 04:40

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.

查看更多
登录 后发表回答