Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not automatically detect an ADB binary - Android Studio

Tags:

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

"waiting for AVD to come online..."   

I've read resetting adb 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.

like image 845
Constantin Avatar asked Sep 21 '16 13:09

Constantin


2 Answers

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.

like image 149
James Lendrem Avatar answered Oct 06 '22 21:10

James Lendrem


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.

like image 28
Eng. Samer T Avatar answered Oct 06 '22 19:10

Eng. Samer T