Open In App
Related Articles

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

Improve Article
Improve
Save Article
Save
Like Article
Like

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: Using Android Studio IDE

Case 1: If adb is not present

Installing the platform-tools resolves the problem. For this, open Android Studio, then open SDK Manager (top-right in the toolbar), then open SDK Tools, then check-mark ✅ Android-SDK Platform-Tools and apply the changes (As shown below).

Steps to add/remove Android-SDK Platform-Tools

Case 2: If adb is present

Reinstalling the platform-tools resolves the problem. For this, open Android Studio, then open SDK Manager (top-right in the toolbar), then open SDK Tools, then uncheck ⬜ Android-SDK Platform-Tools and apply the changes (As shown above).

After this, open C:\Users\Username\AppData\Local\Android\Sdk and delete the platform-tools folder.

Then go back to Android Studio and in the SDK Tools, check-mark ✅ Android-SDK Platform-Tools and apply the changes.

Method 2: Using sdkmanager command-line tool

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

Case 1: If adb is not present

Installing the platform-tools resolves the problem. For this, open Terminal, switch to C:\Users\Username\AppData\Local\Android\Sdk\tools\bin\sdkmanager and run the following command:

sdkmanager "platform-tools"

Case 2: If adb is present

Reinstalling the platform-tools resolves the problem. For this, open Terminal, switch to C:\Users\Username\AppData\Local\Android\Sdk\tools\bin\sdkmanager and run the following command:

sdkmanager --uninstall "platform-tools"

After this, open C:\Users\Username\AppData\Local\Android\Sdk and delete the platform-tools folder.

Then go back to Terminal and run the following command:

sdkmanager "platform-tools"

Method 3: Check your anti-virus

Windows security might have quarantined adb.exe. Allowing adb.exe on the  system resolves this problem. For this, open Windows security, then open Current threats and allow adb.exe on device (As shown below).

Step to allow adb.exe on the system

Last Updated : 18 Nov, 2022
Like Article
Save Article
Similar Reads
Related Tutorials