IllegalArgumentException: Unable to locate adb in Android Studio v2.3
Asked Answered
H

12

8

Does anyone know how to fix this?

IllegalArgumentException: Unable to locate adb

enter image description here

I installed android studio v2.3 and it won't let me run my app saying the error. I searched online and said to click the Launch Standalone Sdk manager but I am unable to locate it.

enter image description here

Hereupon answered 14/3, 2017 at 5:27 Comment(0)
A
14

I also encountered this problem, when I tried to move an Android project from one computer to another. Since I have Android Studio 2.3 I don't have the option to run the standalone SDK-manager (or at least, I don't see any button).

On this website
http://m.blog.csdn.net/article/details?id=51204114
I found the solution to resolve the problem.

Go to Tools >> Android >> SDK-Manager >> SDK-Tools
Uncheck "Android SDK Platform-Tools" and press Apply to uninstall it again.
Uninstall Android SDK Platform-Tools Then check it again to re-install it. Then I was able to compile my project again.

Atalya answered 14/3, 2017 at 17:48 Comment(0)
C
7

On my system Avast Antivirus kept quarantining 'adb.exe', so the file would effectively disappear. Once I suspected that, it was simply (in Avast):

Protection > Virus Chest > [three dot menu by the file] > Restore and add exception

If I would change a folder name, or re-install, I would have to do it again, but at least I knew where to look.

Coil answered 12/5, 2019 at 23:4 Comment(1)
I had Avast Anti Virus for a while..this problem only started today for me!Accompanist
D
6

I had this issue, took a while to figure out but I did manage to solve it.

I ended up copying adb.exe from the AppData/Local/Android/Android-SDK/Platform-Tools folder and copied it to AppData/Local/Android/SDK/Platform-Tools

Seemed to work! Good luck!

Debera answered 25/4, 2017 at 13:3 Comment(2)
@Prasad - That's a different issue. Assuming your using Windows 10. Google how to get permission... I found that I changed the folder properties from Read Only and then restarted my computer.Debera
i done that using adminstrator login I copied. ThanksElli
D
5

I had a similar problem one day ago by deleting a file that avast notified as a virus, you can try the following steps, it works for me:

  1. You have to download the "SDK Platform-Tools for your OS" at this link: https://developer.android.com/studio/releases/platform-tools.html

  2. Unzip the downloaded package

  3. Open the unzipped folder, then copy the "platform-tools" folder
  4. Close Android Studio
  5. Rename the existing "platform-tools" and then paste the new "platform-tools" to your sdk location, in my case: C:\Users\YourUserName\AppData\Local\Android\Sdk
  6. Launch Android Studio and try to run your project

You should be good to go!

Good luck!

Duhon answered 28/5, 2019 at 5:5 Comment(0)
F
2

Download SDK platform_tools copy this in that where you SDK installed location. Then open android studio go to tools → sdk Manager → sdk tool → here install updated SDK platform_tools. This will surely solve the problem of the adb.exe file.

Fiddlewood answered 18/3, 2019 at 1:31 Comment(0)
S
0

Happened with me as well. Try uninstalling and reinstalling SDK platform tools in the SDK manager located in Tools>>Android>>SDK Manager. If this doesn't work(It usually does), then it is possible that for some reason your android-sdk folder doesn't have the Platform-Tools folder containing the adb.exe file. Go to the ADT unzipped file from the first installation and just copy it to the correct path.

Sibley answered 8/6, 2017 at 5:38 Comment(0)
F
0

I had the same problem. I had reason to reinstall Android Studio, additional folders were created sdk. Go to Tools >> Android >> SDK-Manager >>Android SDK NLocation and select another folder sdk. if it is on the list.

[enter image description here][2]

and "ok" >> "Next">>"Next" >>"Finish"

Fante answered 17/6, 2017 at 10:55 Comment(1)
Please read this how-to-answer and follow the guideline there to provide quality answer.Lorettalorette
C
0

Late answer here - for me the solution was to completely delete my current SDK and install it again.
In addition, my antivirus detected the adb as a risky file so after reinstalling the SDK I had to make sure that my antivirus will not do it again.

LiooRyuuguu answer is good but for some reason - reinstalling the SDK from the android studio tools as he suggested didn't work for me, what worked for me as I said was to detect the SDK location in my pc, delete it and install it again.

Cocainism answered 14/3, 2019 at 13:24 Comment(0)
A
0

I had the same problem. The problem was missing or corrupt of adb.exe file in this path: D:\Android_Sdk\sdk\platform-tools I manually copy the adb.exe file from some where in this SDK path and it start working. Image representation of adb.exe path

Abessive answered 21/3, 2019 at 12:34 Comment(0)
H
0

When I tried to uninstall platform-tools through the GUI, it hanged, so instead, I:

  1. uninstalled platform-tools by deleting <AndroidSDK>/platform-tools
  2. reinstalled platform-tools by:
    1. checking IntelliJ IDEA > Settings > Appearance & Behavior > System Settings > Android SDK > SDK Tools > Android SDK Platform-Tools
    2. then pressing OK
Herwin answered 23/3, 2019 at 17:17 Comment(0)
O
0

I had a similar problem a while ago, you can try some things like:

you install the avast antivirus

if that is not the problem then:

You have to download the ADB.EXE again via the page and download according to your operating system

then copy the ADB.exe from that downloaded file

C:> Users> name> Downloads> platform-tools

  -and copy it on the path where you have the platform-tools of your android Studio in my case it is:

C:> Users> name> AppData> Local> Android> sdk> platform-tools

and that's all I hope to help you, regards :)

Organicism answered 26/5, 2019 at 1:5 Comment(0)
T
-1

After to uninstall some tools as some answers recomend, I update Android SDK Tools to Version 24.0.2 and resolved this Issue.

Toothsome answered 24/8, 2017 at 4:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.