Open In App

Fix “Unable to locate adb within SDK” in Android Studio

Improve
Improve
Like Article
Like
Save
Share
Report

The following error occurs when the adb file is not found within the SDK system folder. A software development kit (SDK) provides the software required to build your applications for a target platform. Firstly check if the adb is present in the SDK folder. For this, open C:\Users\Username\AppData\Local\Android\Sdk\platform-tools and check if adb.exe is present.

Method 1/3 – Using Android Studio

If adb is not present

Installing the platform-tools resolves the problem. Follow these steps in Android Studio:

  1. Open SDK Manager.
  2. Open SDK Tools.
  3. Check ✅ Android-SDK Platform-Tools.
  4. Apply changes.

Steps to add/remove Android-SDK Platform-Tools

If adb is present

Reinstalling the platform-tools resolves the problem. Follow these steps in Android Studio:

  1. Open SDK Manager.
  2. Open SDK Tools.
  3. Uncheck ⬜ Android-SDK Platform-Tools.
  4. Apply changes.
  5. Open C:\Users\Username\AppData\Local\Android\Sdk and delete platform-tools folder.
  6. Go back to Android Studio and check ✅ Android-SDK Platform-Tools.
  7. Apply changes.

Method 2/3 – Using sdkmanager command-line tool

If Android Studio IDE is installed, follow Method 1 instead.

If adb is not present

Installing the platform-tools resolves the problem. Follow these steps in Terminal:

  1. Switch to C:\Users\Username\AppData\Local\Android\Sdk\tools\bin\sdkmanager
  2. Run the command: sdkmanager “platform-tools”

If adb is present

Reinstalling the platform-tools resolves the problem. Follow these steps in Terminal:

  1. Switch to C:\Users\Username\AppData\Local\Android\Sdk\tools\bin\sdkmanager
  2. Run the command: sdkmanager –uninstall “platform-tools”
  3. Open C:\Users\Username\AppData\Local\Android\Sdk and delete platform-tools folder.
  4. Go back to Terminal and run the command: sdkmanager “platform-tools”

Method 3/3 – Check your anti-virus

Allowing adb.exe to run on the system resolves the problem. Follow these steps in Windows Settings:

  1. Open Windows security.
  2. Open Current threats.
  3. Allow adb.exe on device.

Step to allow adb.exe on the system


Last Updated : 29 Sep, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads