First open File -> Settings in Android Studio:
Download the "Google USB Driver" plug-in (used for real-device debugging), and note the above SDK path:
Right-click "My Computer" on the desktop, click "Advanced System Settings", and configure the advanced properties of the computer. There are two steps:
- Add a new environment variable ANDROID_HOME. The variable value is the path to the SDK just now.
- Edit the Path variable and add the following two paths:
%ANDROID_HOME%\platform-tools
%ANDROID_HOME%\tools
In fact, what corresponds here are the two folders under the SDK path just now. These two folders exist in the SDK directory:
After configuration, open the command box through win+R and enter adb. If it is as shown below, adb is configured.