Consistently receiving this error message on Android Studio to run app:
java.lang.IllegalArgumentException: Unable to locate adb
Attempted several troubleshooting options by downloading ADB, but the issue was not resolved. Thoughts?
Consistently receiving this error message on Android Studio to run app:
java.lang.IllegalArgumentException: Unable to locate adb
Attempted several troubleshooting options by downloading ADB, but the issue was not resolved. Thoughts?
Finally after several hours of investigation I think I have another solution for everyone having issues with AVD Manager "Unable to locate adb".
I know we have the setting for the SDK in File -> Settings -> Appearance & Behavior -> System Settings -> Android SDK. This it seems is not enough! It appears that Android Studio (at least the new version 4) does not give projects a default SDK, despite the above setting.
So, you also (for each project) need to go to File -> Project Structure -> Project Settings -> Project, and select the Project SDK, which is set to [No SDK] by default.
If there's nothing in the drop-down box, then select New, select Android SDK, and navigate to your Android SDK location (normally C:\Users[username]\AppData\Local\Android\Sdk on Windows). You will then be able to select the Android API xx Platform. You now should not get this annoying adb error.
HTH
Update:
On versions of macOS > 10.15.x (Catalina), the file to use is:
¨/.zshrc
as Apple switched to ZSH as the default login-shell starting with 10.15.
---- Original Answer Follows + small adjustments for clarity ----
This worked for me, on my Mac.
Install platform-tools, and update your $PATH environment variable:
Using your text editor of choice:
nano ~/.zshrc # ~/.bashrc for macOS < 10.15
Edit existing PATH or add the following:
export PATH="$PATH:[PLATFORM-TOOLS-PATH-HERE]"
Save the file and refresh Zsh's configuration:
source ~/.zshrc # (~/.bashrc if macOS < 10.15) Or zsh -l to re-read login scripts
Hope this helps.
Sometimes In “C: \ Users \ User \ AppData \ Local \ Android \ SDK \ platform-tools” folder ADB.exe can be missing. One you can get from developer.Android.com/studio/releases/platform-tools just download “SDK Platform-Tool for Windows” and copy paste ADB.exe, ADBWinApi.dll, ADBWinUsbApi.dll. And then your apps will run perfectly.
If you are working on React native,please make sure you have installed these tools because I was missing them and it resolved my issue
For further detail visit React Native doc for installation