adb or Android Debug Bridge is a command-line tool used to connect Android devices to your computers.
Sometimes, this tool may produce an error in your command prompt that says:
adb is not recognized as an internal or external command, operable program or batch file.
This error happens because your computer doesn’t know where the
adb program can be found.
To fix this error, you need to add the path to
adb in your environment variables.
First, you need to make sure that you have
adb available on your computer.
This program is a part of the Android SDK Platform Tools, which should be included when you install Android Studio.
But if you don’t have the Platform Tools, you can download one here.
Once you have the Platform Tools, extract the content to a folder. For example, place the tools in
C:\AndroidSDK as shown below:
Finally, you need to add the path to
platform-tools in your environment variables.
Open the start menu and search for “environment variables” as shown below:
Open the “Edit system variables menu”, then add
C:\AndroidSDK\platform-tools to the user Path variable:
Once done, click OK and restart your command prompt.
You should be able to access
adb as shown below:
And that’s how you fix the
adb is not recognized error on Windows computers.
If you installed Android Studio, the Platform Tools bundled with the software should already be added to the Path.
If not, you can look for the SDK location from Android Studio and add it manually.
Start Android Studio and select Configure > SDK Manager:
Next, look for the Android SDK Location menu:
Copy that location and add it to the Path variable.
adb tool bundled with Android Studio should now be accessible from the command prompt.