"unable to locate adb" using Android Studio

AndroidAndroid StudioAdb

Android Problem Overview


I have been trying to test my app on real device. I keep receiving error message that "unable to locate adb". I have the USB driver for my phone installed. Thank you for the help. The snap shot is shown below. Snap shot

Android Solutions


Solution 1 - Android

  1. on your android studio at the top right corner beside the search icon you can find the SDK Manager.
  2. view android SDK location (this will show you your sdk path)
  3. navigate to file explorer on your system, and locate the file path, this should be found something like Windows=> c://Users/johndoe/AppData/local/android (you can now see the sdk.) Mac=>/Users/johndoe/Library/Android/sdk
  4. check the platform tools folder and see if you would see anything like adb.exe (it should be missing probably because it was corrupted and your antivirus or windows defender has quarantined it)
  5. close Android Studio, open the Task Manager and finish the ADB.exe process if it's running and then delete the platform tools folder
  6. go back to android studio and from where you left off navigate to sdk tools (this should be right under android sdk location)
  7. uncheck android sdk platform-tools and select ok. (this will uninstall the platform tools from your ide) wait till it is done and then your gradle will sync.
  8. after sync is complete, go back and check the box of android sdk platform-tools (this will install a fresh one with new adb.exe) wait till it is done and sync project and then you are good to go.

If you are still having problems, you may need to set the Project SDK.

I hope this saves someone some hours of pain.

Solution 2 - Android

if using avast go for virus chest,will find adb,restore it by clicking right button..thats all,perfectly works

Solution 3 - Android

open Studio settings-->System settings --> Android SDK --> select SDK tool tab -->> select "Android SDK platform tool" and install

Solution 4 - Android

(I am using Android Studio 3.0.1)

  1. I downloaded "SDK Platform-Tools" from https://developer.android.com/studio/releases/platform-tools
  2. Copied 'adb.exe' to C:\Users\user\AppData\Local\Android\Sdk\platform-tools.
  3. Then I got no errors when running the app.
  4. I also added C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe to the exception list of my anti-virus tool

Solution 5 - Android

I use android studio in Windows 7 and i have AVG for antivirus. The first time you launch adb, AVG prompts you to add avg.exe in antivirus vault. If you accept, then you android studio dont have access to run adb.exe. So open avg >> options >> Virus Vault >> Restore (select the adb file)

Solution 6 - Android

In Android Studio, Click on 'Tools' on the top tab bar of android studio

Tools >> Android >> SDK Manager >> Launch Standalone Sdk manager

there you can clearly see which platform tool is missing , then just install that and your adb will start working properly.In Image You Can see every thing

Solution 7 - Android

Due to some problem my adb.exe, was lost. My space of work suffered an electrical energy interruption, after that, I could not run or compile android programs.

Adb.exe is a file which should be located in your [android directory]/sdk/platform-tools. In my case, the file dissapeared, however the platform-tools was ther. My solution was as follows:

  • I changed the name directory of [android directory]/sdk/platform-tools towards platform-tools_OLD, in order to hide it for android studio without erase it.
  • In [android directory]/sdk there is a file SDK Manager.exe, ... I launched it.
  • A window of "Android SDK Manager" is shown, then, in the Tools folder I chose "Android SDK Platform Tools" and then, Install packages.
  • Enter to Android Studio

This was well for me

Solution 8 - Android

Else this will helps you

The ADB is now located in the Android SDK platform-tools.

Check your [sdk directory]/platform-tools directory and if it does not exist, then open the SDK manager in the Android Studio (a button somewhere in the top menu, android logo with a down arrow), switch to SDK tools tab and and select/install the Android SDK Platform-tools.

Alternatively, you can try the standalone SDK Manager: Open the SDK manager and you should see a "Launch Standalone SDK manager" link somewhere at the bottom of the settings window. Click and open the standalone SDK manager, then install/update the

"Tools > Android SDK platform tools". If the above does not solve the problem, try reinstalling the tools: open the "Standalone SDK manager" and uninstall the Android SDK platform-tools, delete the [your sdk directory]/platform-tools directory completely and install it again using the SDK manager.

Hope this helps!

Solution 9 - Android

I had the same problem, and I solved it by doing:

  • (You should be connected to the internet)
  • click the logo of the SDK Manager
  • click Launch StandAlone SDK Manager (wait a moment)
  • if the dialog of the SDK manager shows, you click cexbox [Tools] and Install all packages
  • if the download is finished, you restart android studio and boot again..

After that, it should work.

Solution 10 - Android

Got it to work go to the local.properties file under your build.gradle files to find out the PATH to your SDK, from the SDK location go into the platform-tools folder and look and see if you have adb.exe. If not go to http://adbshell.com/downloads and download ADB KITS. Copy the zip folder's contents into the platform-tools folder and re-make your project.

I didn't need to update the PATH in the Extended Controls Settings section on the emulator, I left Use detected ADB location settings on. Hope this makes this faster for you !

Solution 11 - Android

I fixed this issue by deleting and inserting new platform-tools folder inside android sdk folder. But it is caused by my Avast anti virus software. Where I can found my adb.exe in Avast chest. You can also solve by restoring it from Avast chest.

Solution 12 - Android

If you are using Anti-Virus, you can first check virus chest and restore from there. Otherwise, just go to your SDK Manager and install Android SDK Tools.

Solution 13 - Android

Check your [sdk directory]/platform-tools directory and if it does not exist, then open the SDK manager in the Android Studio (a button somewhere in the top menu, android logo with a down arrow), switch to SDK tools tab and and select/install the Android SDK Platform-tools.

Alternatively, you can try the standalone SDK Manager: Open the SDK manager and you should see a "Launch Standalone SDK manager" link somewhere at the bottom of the settings window. Click and open the standalone SDK manager, then install/update the

"Tools > Android SDK platform tools". If the above does not solve the problem, try reinstalling the tools: open the "Standalone SDK manager" and uninstall the Android SDK platform-tools, delete the [your sdk directory]/platform-tools directory completely and install it again using the SDK manager.

Hope this helps!

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJoeView Question on Stackoverflow
Solution 1 - Androidharny otuoniyoView Answer on Stackoverflow
Solution 2 - AndroidamyShamnaView Answer on Stackoverflow
Solution 3 - AndroidLibin ThomasView Answer on Stackoverflow
Solution 4 - AndroidSubhashiView Answer on Stackoverflow
Solution 5 - AndroidMichael Marinos LikourasView Answer on Stackoverflow
Solution 6 - AndroidRajendhiran EasuView Answer on Stackoverflow
Solution 7 - AndroidJosé GuadalupeView Answer on Stackoverflow
Solution 8 - AndroidRajendhiran EasuView Answer on Stackoverflow
Solution 9 - AndroidBriliant FayView Answer on Stackoverflow
Solution 10 - Androidgr7xView Answer on Stackoverflow
Solution 11 - AndroidAjmal TkView Answer on Stackoverflow
Solution 12 - AndroidTushar LathiyaView Answer on Stackoverflow
Solution 13 - AndroidMostafa AboelnasrView Answer on Stackoverflow