Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Android Studio says it cannot find adb

ErrorUnable to locate adb

Short answer

adb is shipped in the SDK Platform-Tools package, in the platform-tools folder of your Android SDK. Android Studio cannot find it when that package is not installed, when the SDK location points at the wrong folder, or, in a terminal, when platform-tools is not on PATH. Check the folder first, then install the package from SDK Manager.

  • Applies to Android Studio current stable, Android SDK Platform-Tools current stable, Windows 11, macOS 26, Ubuntu 24.04
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Look inside the SDK folder for platform-tools. If adb is there, the problem is the path or PATH. If the folder is missing or empty, the package is not installed. (Windows: use dir under %LOCALAPPDATA%\Android\Sdk.)

    ls "$ANDROID_HOME/platform-tools" || ls ~/Library/Android/sdk/platform-tools
  2. 2Match what you see, then jump to its fix

    1. 1The platform-tools folder is missing or has no adb file in it, and SDK Manager shows Android SDK Platform-Tools as not installed.The Platform-Tools package is not installed or was deletedFix
    2. 2SDK Manager shows Platform-Tools installed, but the Android SDK Location differs from the folder you are checking.Android Studio looks at a different SDK folder than the one you installed intoFix
    3. 3Android Studio runs apps fine, but typing adb in a terminal gives 'not recognized' or 'command not found'.platform-tools is not on PATH, so only the terminal failsFix

What does the error look like?

  • Unable to locate adb
  • 'adb' is not recognized as an internal or external command, operable program or batch file.
  • adb: command not found

Cause 1 of 3

The Platform-Tools package is not installed or was deleted

1Check

Open Tools > SDK Manager > SDK Tools and look at the Android SDK Platform-Tools row. A cleaner or an antivirus tool can also remove files from this folder.

sdkmanager --list | grep platform-tools

2Fix

Tick Android SDK Platform-Tools in the SDK Tools tab and click Apply. From a terminal, the sdkmanager tool installs the same package.

sdkmanager "platform-tools"

3Verify

adb now exists in the SDK folder and reports its version.

"$ANDROID_HOME/platform-tools/adb" version

Confirmed by developer.android.com

Did this fix it?

Cause 2 of 3

Android Studio looks at a different SDK folder than the one you installed into

1Check

Open Tools > SDK Manager and read Android SDK Location at the top. The SDK Manager installs every package into that directory.

echo $ANDROID_HOME

2Fix

Point the IDE at the folder that really holds your SDK, or install Platform-Tools into the folder the IDE already uses. Keep ANDROID_HOME equal to that same folder.

export ANDROID_HOME=~/Library/Android/sdk

3Verify

Restart Android Studio, open SDK Manager and confirm the path, then run the app again.

ls "$ANDROID_HOME/platform-tools/adb"

Confirmed by developer.android.com

Did this fix it?

Cause 3 of 3

platform-tools is not on PATH, so only the terminal fails

1Check

The terminal only finds adb when the platform-tools folder is on PATH. Android Studio does not need this.

echo $PATH | tr ':' '\n' | grep platform-tools

2Fix

Add ANDROID_HOME/platform-tools to PATH in your shell startup file (on Windows, in the system environment variables), then open a new terminal.

export ANDROID_HOME=~/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools

3Verify

A new terminal finds adb.

adb version

Confirmed by developer.android.com

Did this fix it?

How do I stop it coming back?

  • Keep one SDK folder and set ANDROID_HOME to it, so Android Studio, Gradle and the terminal agree.
  • Update Platform-Tools from SDK Manager instead of keeping a second copy in another folder.
  • If an antivirus tool quarantines adb.exe, add the SDK folder to its exclusions.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

A phone is plugged in over USB but Android Studio and adb do not list it

adb devices prints List of devices attached with nothing below it

adb lists a phone only when four things hold: USB debugging is on, you accepted the computer's RSA key on the phone, the computer has a driver or udev rule for the device, and the cable carries data to a running adb server.

6 causes, each with a fix

Mobile apps

Gradle cannot find the Android SDK on this machine

FAILURE: Build failed with an exception. What went wrong: SDK location not found.

Gradle looks for the Android SDK in the sdk.dir line of android/local.properties and in the ANDROID_HOME environment variable, and found neither.

4 causes, each with a fix

Mobile apps

adb tcpip 5555 fails because no device is found

adb: more than one device/emulator

adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.