Android Studio says it cannot find adb
Unable to locate adbShort 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.
Fix it fast
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-tools2Match what you see, then jump to its fix
- 1
The 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
SDK 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
Android 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
- 1
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-tools2Fix
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" versionConfirmed by developer.android.com
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_HOME2Fix
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/sdk3Verify
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
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-tools2Fix
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-tools3Verify
A new terminal finds adb.
adb versionConfirmed by developer.android.com
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 fixMobile 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 fixMobile apps
adb cannot start because something already holds its port
adb start-server failed
The adb server must bind local TCP port 5037, and every adb client talks to it there.
2 causes, each with a fixMobile apps
adb cannot connect to its daemon or start the server
* daemon started successfully *
The adb server is a background process on your computer that listens on TCP port 5037.
2 causes, each with a fixMobile apps
adb prints 'server version doesn't match this client; killing...'
adb server version doesn't match this client; killing...
adb runs a background server, and every adb command is a client.
3 causes, each with a fixMobile 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