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.
-
1Which OS you are using? – Mustansir Aug 19 '16 at 10:36
-
1http://stackoverflow.com/questions/27301960/errorunable-to-locate-adb-within-sdk-in-android-studio – Mustansir Aug 19 '16 at 10:37
-
1https://stackoverflow.com/a/44012368/8383245 this is working after try many answers try this at first – Muhamad Baneshi Jul 28 '17 at 17:22
13 Answers
- on your android studio at the top right corner beside the search icon you can find the SDK Manager.
- view android SDK location (this will show you your sdk path)
- 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
- 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)
- close Android Studio, open the Task Manager and finish the ADB.exe process if it's running and then delete the platform tools folder
- go back to android studio and from where you left off navigate to sdk tools (this should be right under android sdk location)
- 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.
- 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.

- 2,300
- 1
- 8
- 8
-
4Thanks a bunch! For me i dint have to delete platform-tools, I found adb.exe in platform-tools.backup and copied it back to platform-tools. But this helped me get there – manpikin May 18 '18 at 13:30
-
this should be marked as correct its the best and self explanatory – Austine Gwa Jun 08 '19 at 04:30
-
@ThorkilVærge what exactly is the issue you are running into? did you follow the steps i highlighted? – harny otuoniyo Jul 07 '20 at 21:44
-
5
-
2@KasparL.Palgi if it is there and you are having this issue, then it is probably corrupted, go ahead and delete it, then follow the steps to download a fresh one. let me know if you still have any issues after this, thanks. – harny otuoniyo Aug 16 '20 at 12:59
-
@KasparL.Palgi thanks so much for the feedback, I'm so glad it worked :) – harny otuoniyo Aug 26 '20 at 10:27
-
Trying this on a Mac, the procedure goes well, but still getting the error upon launch of any virtual devices. I've tried wiping and reinstalling 6 times now and still the error. Any ideas? – CU3ED Aug 27 '20 at 17:45
-
@CU3ED sorry to hear this, quick one, did you uninstall the android studio and reinstall again 6 times?? secondly, when running an app, does it run on your physical device without any issues?? – harny otuoniyo Aug 28 '20 at 21:14
-
Thank you. we are still with this problem, First thing I found adb.exe in tools but i delete folder and follow this steps and problem is still happen Additional The Messages error showed "unable to locate adb" and emulator is working but not response and event – GeeSuth Sep 20 '20 at 16:34
-
1Hi @GeeSuth, I'm sorry to hear about your current issue, the emulator and adb were not built as one entity, the adb is simply what helps your software ships to a device/emulator, with the absence of the bridge(adb) you can't debug. if it says unable to locate adb it means the folder where it checks for adb is present but adb isnt there, please ensure platform tools folder located in your laptop has been deleted, then follow the steps above to install a fresh one thanks. please let me know if you need further assistance – harny otuoniyo Sep 21 '20 at 17:04
-
@harnyotuoniyo Thank you. i fixed problem by Clear Cache for emulator. i don't know how this get fixed but it's working successful now, Thank you – GeeSuth Sep 21 '20 at 20:13
-
-
Mine required a restart of the Android Studio App and then all was fine, thanks! – Roshna Omer Dec 27 '20 at 08:01
-
I deleted it, reinstalled, and have the same error "Unable to locate ADB". Windows 10, no anti virus, and firewall disabled. Restarted computer too. adb.exe exists and I can run it through cmd – Curtis Jan 13 '21 at 08:04
-
@Curtis, sorry about this, can you confirm that you android studio is pointing to the right path where the adb.exe is located? if it points to the right path and still can not find it then your adb is corrupted. 1) clean your android studio project, then confirm you are pointing to the right path. if any further challenges, kindly let me know thanks – harny otuoniyo Jan 13 '21 at 11:19
-
Yes it is pointing at the right path. My adb is not corrupted, it works fine when I run adb through command prompt. I have tried cleaning my project. – Curtis Jan 23 '21 at 08:47
-
Hi @Curtis, can you try running "adb kill-server" from command line, then try running your app normally, hopefully android studio should restart a new adb server and solve your issue. I hope this helps – harny otuoniyo Jan 24 '21 at 01:06
-
1My IDE hung when trying to uninstall, so I canceled the uninstall and restarted the IDE, and it detected missing packages and prompted me to reinstall them. It succeeded that time. – devinbost Feb 13 '21 at 07:44
-
11As of Android Studio 4, you might also need to [set an SDK for the project](https://superuser.com/a/1561048/504449) since the IDE does not seem to do this on its own. – Stacky Feb 16 '21 at 08:21
if using avast go for virus chest,will find adb,restore it by clicking right button..thats all,perfectly works

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

- 1,132
- 13
- 17
(I am using Android Studio 3.0.1)
- I downloaded "SDK Platform-Tools" from https://developer.android.com/studio/releases/platform-tools
- Copied 'adb.exe' to C:\Users\user\AppData\Local\Android\Sdk\platform-tools.
- Then I got no errors when running the app.
- I also added C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe to the exception list of my anti-virus tool

- 4,145
- 1
- 23
- 22
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

- 273
- 4
- 14
-
3i don't see any Android under the Tools. What image are u talking about? – eqrakhattak Mar 16 '21 at 10:40
-
8Modern Android Studio (4.1.3 at least) places the option by (Tools->SDK Manager) for an Android application project. You need to pick the menu option. After that, you need to go to "Appearance & Behaviour/System Settings/Android SDK" page, pick "SDK Tools" tab and toggle "Android SDK Command-line Tools (latest)" – Rinat Gadelshin Apr 21 '21 at 16:18
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)

- 568
- 6
- 15
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

- 51
- 1
- 1
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.

- 41,995
- 13
- 95
- 133

- 45
- 2
-
Really? First restart AndroidStudio and then reboot the system? Impressive. – arkascha Jul 19 '23 at 05:34
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 !

- 31
- 5
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.

- 153
- 1
- 4
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.

- 2,870
- 24
- 39
- 44

- 940
- 9
- 26
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!

- 273
- 4
- 14
-
10instead of copying from others answer you should provide a link to that site – Nilabja Aug 19 '16 at 11:33
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!

- 18,333
- 31
- 67
- 74

- 11
- 1
-
Hi, please don't approve edits like that that make a post worse. Link-only posts aren't useful and will generally be deleted as "not an answer." I've gone ahead and rolled it back. – Ryan M Jun 01 '21 at 22:06