Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
548 views
in Technique[技术] by (71.8m points)

android studio - Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'

I am running Android Studio on Windows 10 64 bit. I upgraded to the latest build and SDK the morning of 5/20, and since then I get the above error when opening Android Studio. I also get the 'Unable to obtain result of 'adb version' in the event log. If I launch the application (which worked fine before the update) the 'Select Deployment Target' window appears, showing 'Initializing ADB' with a loading graphic for a few seconds, which then results in a 'Nothing to show' message. Previously I had 4 different emulators set up, and an active device connect via USB. Now ... nothing.

Creating a new emulator has no effect - I go through the steps and still see the 'Nothing to show' message.

I have tried the following:

  • Reverting to older platform tools
  • Removing and re-installing the latest platform tools
  • Removing and re-installing Android Studio completely
  • Installed Genymotion to try emulate through that (I can create and start the emulator in Genymotion, it makes no different to the above issue in AS)
  • killed adb.exe through Task Manager, then ran adb tcpip 5555 through the terminal, the output was:

    • daemon not running. starting it now on port 5037 *
    • daemon started successfully * restarting in TCP mode port: 5555

Which was encouraging, but the same issue described above persists (even after a restart of AS).

Switch to USB mode and back to TCPIP through adb in the terminal, no luck.

  • Migrated the entire project to Eclipse until I ran into support issues with Google Play Services (so I'm going to have to stick to AS, but I am getting desperate here)

Anyone that can assist - I would greatly appreciate it.

UPDATE - 5/23

I did a search for adb.log and found it in a temp folder on a completely different drive to the one that contains AS or my project files. Closed everything down, killed adb.exe through the task manager and deleted the file. Upon relaunching AS I received the following message:

screenshot of message

I could start/kill ADB through the terminal. adb devices resulted in an empty list. My idea.log file is filled with entries as from the date my trouble started. Restarting AS again resulted in the usual 'Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'' message.

Here is the last entry in my idea.log file:

2016-05-23 10:13:19,081 [ 824808] INFO - tools.idea.ddms.adb.AdbService - Initializing adb using: E:UsersJakeSabreAppDataLocalAndroidsdkplatform-toolsadb.exe, client support = false 2016-05-23 10:13:24,082 [ 829809] WARN - #com.android.ddmlib - Unable to obtain result of 'adb version' 2016-05-23 10:13:24,083 [ 829810] INFO - ditor.DeployTargetPickerDialog - Unable to obtain debug bridge java.lang.RuntimeException: Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'

at com.android.tools.idea.ddms.adb.AdbService$1.run(AdbService.java:236)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:366)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)

The really weird part is that I actually managed to get something working yesterday - but I don't know how. I started AS and received the same error, but then started Eclipse (Mars 2) and launched the Android Device Manager through Eclipse. As soon as I did I could launch my app through the AS emulator! I closed it all down and tried again, just to be sure and it worked again.

This morning I tried the same trick, but was told my SDK is missing. I checked and platform-tools was indeed missing (not sure why). So I installed it again, got the usual error, and now my trick with Eclipse is no longer working. I feel like I am in the Twilight Zone here.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The solution is very simple. Open 'Command Prompt' as 'Administrator', run adb kill-server, then adb start-server. It worked for me.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...