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.
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/ .
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.
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.
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.
I am writing the solution which worked for me:
Had the same problem. Solution was that Avast deleted the adb.exe. Try adding the SDK folder to your antivirus whitelist.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With