nlulin
nlulin

Reputation: 161

Android Studio show the dialog "unable to create debug bridge : unable to start adb server: unable to obtain result of 'adb version'"

When I open Android Studio, it shows the dialog below, and my application can't run as debug mode.

Unable to create Debug Brisge. Unable to start adb server. Unable to obtain result of 'adb version'

Upvotes: 14

Views: 30876

Answers (3)

nmr
nmr

Reputation: 16850

It looks like Android Studio 3.2 uses DNS to resolve "localhost" on OSX (that seems like a bad idea, Google), and in my case a bad DNS entry on the local DNS server broke things.

nmr2:notes nathan$ hostname nmr2 nmr2:notes nathan$ host nmr2 nmr2.mycompany.co has address 192.168.0.31 nmr2:notes nathan$ host localhost localhost.mycompany.co has address 192.168.0.85 nmr2:notes nathan$ sudo grep -rni 192.168.0.85 /etc

So, verify that localhost resolves to 127.0.0.1

Upvotes: 0

刘天益
刘天益

Reputation: 241

Find the folder of sdk->platform-tool then run the command adb tcpip 5555.

This should result in the following:

adb tcpip 5555 result

Now restart Android Studio and reconnect the Android Monitor:

Reconnect android monitor

Upvotes: 24

Ayman Mahgoub
Ayman Mahgoub

Reputation: 4220

  1. Stop adb from terminal by calling adb kill-server repeatedly to kill all running unstances of adb.
  2. Disable adb integration at android Studio by unmarking “Enable ADB Integration” (from toolbar -> Tools -> Android -> Enable ADB Integration).
  3. Enable ADB Integration again by marking “Enable ADB Integration”.
  4. Finally run project, so adb will be started automatically and properly.

Upvotes: 8

Related Questions