Could not automatically detect an ADB binary - Android Studio
Asked Answered
A

9

41

I tried testing my app on Android Studio but I was getting stuck at

"waiting for AVD to come online..."  

I've read resetting from Android Device Monitor will do it, and it did...
for 1 test, when I've restarted my PC the next day I'm getting not only:

"waiting for AVD to come online..." 

but also

"Could not automatically detect an ADB binary." error every time I try testing my app.

Here is an image

Maybe worth mentioning when I did that 1 test, I was also getting the

"Could not automatically detect an ADB binary." 

error, but at least it worked.

Arta answered 21/9, 2016 at 13:29 Comment(1)
T
27

Just open the emulator and click on the three dots on the last of the toolbar line, the other page will open then go to setting, then there is the the option "USE DETECTED ABD LOCATION" just off that than the option will come click on that and select adb.exe the location of adb.exe is go to your main disk location example my main disk location is C:\ just select your own disk where your windows, mac, linus is installed,then go to users, then AppData, then Local, then Android then select sdk then platform-tool and select adb.exe then click ok

Trussing answered 13/8, 2021 at 8:28 Comment(1)
In my case, the file was located in C:\Users\USERNAME\AppData\Local\Android\Sdk\platform-toolsBiosphere
C
14

From my experience this is because the AVD can't detect your ADB binary. When you launch the AVD if you go into settings, it's the '...' symbol on the toolbar of the virtual machine, then go to the 'Settings' section there should be an option called 'Use detected ADB location' switch this off then select the location of your adb binary. In Linux you can do this by typing the command:

which adb

Select the location shown in the settings. Once you've done that the error should stop appearing.

Chromatics answered 28/3, 2017 at 8:29 Comment(2)
Where do you find this option?Upper
Does this help? kinocreative.co.uk/wp-content/uploads/adb_location.pngChromatics
A
11

This error because android studio did not find adb.exe in SDK\platform-tools folder. Maybe this is caused by sdkmanager while trying to update current packages.

Any way, the easiest way to fix this error is by downloading SDK Platform Tools as zip file from https://developer.android.com/studio/releases/platform-tools.html , unzip it and replace the current platform-tools folder in SDK folder.

Anabasis answered 12/1, 2018 at 3:55 Comment(0)
H
4

I'm remaking the selected answer. I tried to edit it myself but the editing queue is full. Here it is, for the sake of clarity.

Follow these steps:

  1. Open the emulator and click on the three dots at the bottom of the toolbar line. A new window will open (the Extended Controls of the emulator).
  2. Then select the Settings tab. There, toggle the option `Use detected ABD location" off.
  3. The folder selection for that field will turn on. Open it, and select the adb.exe from its current location.
  4. That executable should be somewhere in your main disk (this will vary depending on your actual OS, either Windowx, Linux or macOS). Go to users > AppData > local > Android > sdk > platform-tools > select adb.exe file.
  5. Click Open in the selection window. The full path to the file shoulb be visible. Lastly, close the emulator's Extended Controls window. Done!

Path example in Windows:

C:/Users/<username>/AppData/Local/Android/Sdk/platform-tools/adb.exe

Screen recording:

enter image description here

Heavyfooted answered 21/9, 2016 at 13:29 Comment(0)
A
4

On my device (Windows 10 x64) it is located at:

C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe
Aprylapse answered 11/8, 2022 at 16:27 Comment(0)
B
3

Click on the ... in the emulator and click on settings -> "User detected ABD location" will be switched on. Change it to off and browse the location of adb.exe under platform tools.

Bille answered 11/1, 2023 at 5:49 Comment(0)
N
2

go to ..\AppData\Local\Android\Sdk\platform-tools and reinstall your ADB, i guess this happens on ADB 32 in an system 64bits

Nozicka answered 6/6, 2019 at 14:19 Comment(0)
B
2

Go and check your sdk/platform-tools, is adb there? If not Open SDK manager and download Android platform tools, contains adb.

After that try once again, for me this works

Brundisium answered 14/5, 2020 at 12:49 Comment(0)
K
0
  1. download platform-tools from : https://developer.android.com/studio/releases/platform-tools
  2. Extract files and
  3. copy platform-tools folder to location : C:\Users\User-Name\AppData\Local\Android\Sdk
  4. overwrite all files
Killen answered 27/11, 2021 at 10:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.