Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android studio platform-tools missing adb.exe

Today, I clicked some update when I launch Android Stodio. I forgot what it is. Then, I run some code when there is a error "8:34 PM IllegalArgumentException: Unable to locate adb"

Then, I google for few hours and still cannot solve my problem. And I found that there is no "adb.exe" under my platform-tools folder.

Can someone help?

my os is Window 10. I have tried uninstall Android Studio and install it back. It doesn't help.

Edit 1: After I re-install the platform-tools, I get back the adb.exe.But, I run my program again, it does the "ADB initialization", my adb.exe file lose again.

like image 836
richardrun Avatar asked May 18 '17 03:05

richardrun


People also ask

Where is ADB exe Android Studio?

adb is included in the Android SDK Platform-Tools package. You can download this package with the SDK Manager, which installs it at android_sdk /platform-tools/ .

Is ADB installed with Android Studio?

adb stands for the “Android Debug Bridge,” which is a command line utility that is the debug multitool for Android. Typically it's installed via Android Studio when you install the Android SDK under platform-tools , but it takes some amount of setup for your operating system to know to look there.

Where is the ADB EXE file?

For this, open C:\Users\Username\AppData\Local\Android\Sdk\platform-tools, check if adb.exe is present. Case 1: If adb is not present: If the adb is not present, installing the platform-tools resolves the problem.

How do you check if ADB is installed or not?

Assuming you have Android Studio installed, a quick way to locate it via the app is to again go to File -> Settings, then type “SDK” in the search bar. The “Android SDK” menu will show you where your SDK is installed, which will be the directory that should contain platform-tools.


3 Answers

I am writing the solution which worked for me:

  • go to SDK Platform Tools;
  • download SDK Platform-Tools for Windows;
  • extract zip file and copy to \AppData\Local\Android\sdk\platform-tools.
like image 67
rookieDeveloper Avatar answered Sep 24 '22 13:09

rookieDeveloper


Had the same problem. Solution was that Avast deleted the adb.exe. Try adding the SDK folder to your antivirus whitelist.

like image 30
SWDEV Avatar answered Sep 25 '22 13:09

SWDEV


What worked for me (after having AS 2.x and AS 3.x installed and trying to get Canary 3.1 to work):

Sometimes during an update/trying to sideload a new version of Android Studio, the updater/patcher screws up. It might delete adb after saying it will stop and update it, it might be fastboot or aapt ... whatever.

What works for me is to delete the whole sdk/platform-tools folder, restart AS and get it to redownload the entire platform tools package.

Then start AS again and go to File->Invalidate caches/restart.

If you have been updating Java, you might also want to ensure your JAVA_HOME is correct and that your AS project has been set to the correct JDK (project settings).

like image 22
MacD Avatar answered Sep 24 '22 13:09

MacD