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

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

Upvotes: 8

Views: 32958

Answers (12)

Tymur Kozachok
Tymur Kozachok

Reputation: 1

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"

Upvotes: 0

Wadelaire VERSAILLOT
Wadelaire VERSAILLOT

Reputation: 51

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!

Upvotes: 5

Leon K. Görges
Leon K. Görges

Reputation: 163

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.

Upvotes: 14

jose ramos martinez
jose ramos martinez

Reputation: 1

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 :)

Upvotes: 0

Rick Shory
Rick Shory

Reputation: 481

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.

Upvotes: 7

Eric
Eric

Reputation: 17536

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

Upvotes: 0

Pir Fahim Shah
Pir Fahim Shah

Reputation: 10623

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

Upvotes: 0

Ayesha Sadiqa
Ayesha Sadiqa

Reputation: 21

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.

Upvotes: 2

Tamir Abutbul
Tamir Abutbul

Reputation: 7651

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.

Upvotes: 0

Eddy
Eddy

Reputation: 1

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

Upvotes: -1

Avinash Sharma
Avinash Sharma

Reputation: 1

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.

Upvotes: 0

Phill Wiggins
Phill Wiggins

Reputation: 2917

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!

Upvotes: 6

Related Questions