问题
Does anyone know how to fix this?
IllegalArgumentException: Unable to locate adb
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.
回答1:
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.
Then check it again to re-install it. Then I was able to compile my project again.
回答2:
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.
回答3:
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!
回答4:
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:
You have to download the "SDK Platform-Tools for your OS" at this link: https://developer.android.com/studio/releases/platform-tools.html
Unzip the downloaded package
- Open the unzipped folder, then copy the "platform-tools" folder
- Close Android Studio
- 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
- Launch Android Studio and try to run your project
You should be good to go!
Good luck!
回答5:
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.
回答6:
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.
回答7:
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.
回答8:
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
回答9:
When I tried to uninstall platform-tools through the GUI, it hanged, so instead, I:
- uninstalled platform-tools by deleting
<AndroidSDK>/platform-tools
- reinstalled platform-tools by:
- checking
IntelliJ IDEA > Settings > Appearance & Behavior > System Settings > Android SDK > SDK Tools > Android SDK Platform-Tools
- then pressing OK
- checking
回答10:
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 :)
回答11:
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.
[
][2]and "ok" >> "Next">>"Next" >>"Finish"
回答12:
After to uninstall some tools as some answers recomend, I update Android SDK Tools to Version 24.0.2 and resolved this Issue.
来源:https://stackoverflow.com/questions/42778344/illegalargumentexception-unable-to-locate-adb-in-android-studio-v2-3