Error initializing ADB: Unable to create Debug Bridge: Unable to start ADB server
Asked Answered
A

7

34

When no other of these questions are helping me, then this means I need to remove and reinstall Android Studio.

Here's the error:

Error initializing ADB: Unable to create Debug Bridge:
Unable to start ADB server: adb server version (36) doesn't match this client;
killing... could not read OK from ADB server

  • failed to start daemon error:
    cannot connect to daemon 'C:\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary.
Andy answered 17/3, 2018 at 18:30 Comment(2)
After hours of searching and no results, I found the solution on MacOS by accident. Hit cmd + ; and I was met with a screen with a red "no sdk" dropdown. Filling that in with the existing Android API made it all work.Duncan
See #55648030Mythologize
X
94

There are a couple of solutions depending on what exactly is causing the problem.

So, just follow the following steps.

Step 1:- Close Android-Studio.
Step 2:- Open Command prompt or win + r, type cmd and press Enter.
Step 3:- Navigate to your platform-tools, in most of the cases the location is:

C:\Users\[user]\AppData\Local\Android\android-sdk\platform-tools

but in your case, the location is:

C:\Android\Sdk\

For Mac users the path is

/Users/[user]/Library/Android/sdk/platform-tools

Step 4:- Type adb.exe start-server, Press Enter
Step 5:- Open Android Studio again.

For Mac the command is just adb start-server

The problem should be solved!


If the problem persists, then follow these steps-

Step 1:- Close Android Studio.
Step 2:- Press Alt + Ctrl + Del, then choose Start Task Manager.

Windows Task Manager opens.

Step 3:- Go to the processes tab.
Step 4:- Look for adb.exe and select that.
Step 5:- Press End Process.
Step 6:- Open Android Studio again.

That's it. Now your problem must be solved!


But if the problem is still there (which I don't think will happen), then there is something wrong (or might be missing) in your platform-tools.

To fix that, delete platform-tools from your computer, then download them again from Official Android Developer website.

Extract the downloaded file.

Now place the extracted file, where platform-tools were located before deleting.

Default Location of platform-tools is

C:\Users\[user]\AppData\Local\Android\android-sdk\

But in your case, the location is

C:\Android\Sdk\
Xeniaxeno answered 18/3, 2018 at 6:21 Comment(6)
With me, I solved by uninstall Universal Adb DriverSebi
This works like a charm, but is this should be done every time we start the emulator?Burgundy
Sadly none of the three options worked for me and now I think it is because mine is company's laptop. I know that does not make sense.Sutton
https://mcmap.net/q/197341/-android-studio-quot-error-initializing-adb-android-debug-bridge-not-found-quot Here is something which helped me. Posting for future devsSutton
After trying a lot of solution , this solution works for meNoni
I'm also getting this error when opening my Jetpack Compose project on my Surface tablet (I mainly use my desktop PC to do development). It used to work so I'm not sure what happened. Mine also says "Process did not terminate within specified timeout, killing it: 'C:\Program Files\Unity\Hub\Editor\2020.3.20f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\adb.exe start-server' failed -- run manually if necessary" I do have Unity installed on here too but I'm not sure where Android Studio, or my project, is getting that path from. Trying the solutions above did not work.Blent
B
12

I spent around a complete day to look for the solution but couldn't find the 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.
Bowfin answered 14/8, 2018 at 18:5 Comment(1)
After trying so many steps I found the solution in step 3 of your answer. After uninstalling the antivirus it works fine.Burgundy
B
12

Steps to follow for Immediate recovery.

No need to close Android Studio.

  1. Goto Task Manager By Clicking (Ctrl + Shift + Esc).
  2. Open Processes Tab.
  3. Click Image Name in the Processes Tab for Ascending Order(A-Z).
  4. Now choose adb.exe (or) adb.exe*32 (or) adb.exe*64.
  5. Now Click End Process Button at Right End Bottom corner.
  6. That's All , Now your adb will auto re-started When Launching Application.
Bennion answered 5/7, 2019 at 9:57 Comment(0)
T
6

Download, extract and replace the platform-tools folder with this one here because the adb.exe file could be corrupted or empty with a file size of 0KB

File path on windows

C:\Users[user]\AppData\Local\Android\Sdk\platform-tools

File path on mac

/Users/[user]/Library/Android/sdk/platform-tools
Trellas answered 24/11, 2020 at 19:46 Comment(0)
R
4

on MacOS, I kill all adb process in Activity Monitor. Its working...

Radiolocation answered 28/9, 2021 at 5:47 Comment(0)
B
2

On my Macbook, I had to kill an already running server from the terminal to fix the problem:

josh@JoshsMBP ~ % ps aux | grep adb 
josh             19134   2.5  0.0  4421320   5216   ??  Ss   31Aug21 229:41.25 adb -L tcp:5037 fork-server server --reply-fd 4
josh             93496   0.8  0.0  4279728    816 s000  S+    1:47pm   0:00.00 grep adb
josh@JoshsMBP ~ % pkill adb
Brucebrucellosis answered 22/9, 2021 at 12:53 Comment(0)
C
0

This issue comes due to antivirus treating adb as malware sometimes

Solution 1

  • Close the android studio
  • End task background process adb.exe()/ adb.exe(32)/ adb.exe(64) from Task Manager.
  • Relaunch android studio.

Solution 2

  • open cmd (administrator mode) ...\Android\sdk\platform-tools on this path and run the following commands:
  • adb.exe kill-server
  • adb.exe start-server
Carboloy answered 9/11, 2022 at 6:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.