Article directory
1.Android SDK download
-
Currently, there is no separate SDK download and installation package on the official website. Google’s official website recommends downloading Android Studio, which includes the Android SDK. Official website download address
- As shown below, select the corresponding system to download.
- As shown below, select the corresponding system to download.
-
Because the installation package of Android Studio is too large, when using the adb command, you actually only need to use the SDK tool. Therefore, it is recommended that you go to another domestic Android tool download website androiddevtools to download.
- After entering the page, click the [
Android SDK 工具
] button, then click the [SDK Tools
] button in the pop-up selection box, and then the interface will automatically jump to SDK download interface, choose the version that suits you to download
- After entering the page, click the [
2.Android SDK installation
-
After the download is complete, click
exe文件
to install ( you can download it in zip format and unzip it directly) -
The first step is to click next
-
The language used for Android development is
java
, so it depends on the java environment (at least java5 or above)- this step
SDK会自动去找jdk的环境
- Reference article if the java runtime environment jdk is not installed Installation steps of jdk8
- this step
-
Choose to install to this user
-
Select installation path
-
Select the Start Menu folder for the Android SDK Tools shortcut.
-
Wait for installation to complete
-
Click Finish to complete the installation
3.Configuration of Android SDK
-
Open the Android SDK directory
SDK Manager.exe
(Manage Android-related configurations and Android versions)
-
Select
Deselect All
Uncheck all the boxes, then check the ones we need to install
-
Select
Android SDK Tools
,Android SDK Platform-tools
,Android SDK Build-Tools
under Tools. These three items need to be installedAndroid SDK Tools: including testing, debugging, and third-party tools. Simulators, data management tools, etc.
Android SDK Platform-tools: Contains platform-dependent development and debugging tools for developing apps.
Includes:adb:android调试工具
。- fastboot: boot tool.
- platforms/directory: includes the android platform. Contained in the android.jar library. You must specify a platform as your compilation target.
- system-images directory: compiled system images. The emulator can be loaded directly.
- sources directory: the source code directory of android sdk.
- samples directory: sdk examples.
Android SDK Build-Tools: Compilation tools directory, including compilation tools converted into davlik virtual machines.
contains:- aapt (Android Asset Packaging Tool): Compile the application's resource files (including AndroidManifest.xml and your Activities' xml files) and generate R.java files so that you can reference resources from your java code.
- aidl: Convert the .aidl interface into a java interface.
- dx: Convert .class intermediate code to dvlik intermediate code. All .class files compiled by Java need to be converted by this tool and finally packaged into apk files.
- dexdump: dump devlik intermediate code.
-
Select one of the Android versions (
Android R表示Android11
) and only selectSDK Platform
Install
-
SelectInstall in
Extras
Google USB Driver(谷歌USB驱动)
-
Check the ones you want to install and click on the lower right
install
-
The installation window pops up, click
Accept License
, clickInstall
-
Wait for installation to complete
-
Installed
Note: The following are some applications corresponding to different Android versions and do not need to be installed.
4. Environment variable configuration of Android SDK (win 10)
After the installation is complete, you can start configuring environment variables. The method is similar to the method of setting environment variables of JAVA JDK.
"Right-click My Computer"->"Properties"->"Advanced System Settings"->"Environment Variables"->"System Variables"->"New"
-
Create
ANDROID_HOME
, the value isSDK的安装目录
, such as D:\Android\android-sdk
-
After creating the new one
ANDROID_HOME
, findPath变量编辑
Add the paths of
\tools
,\platform-tools
and\build-tools\19.1.0
of the SDK toPath 变量
(These two directories will exist after you install and update Android SDK Tools, Android SDK Platform-tools, and Android SDK build-tools through the SDK Manager)
- New
%ANDROID_HOME%\tools
- New
%ANDROID_HOME%\platform-tools
- New
%ANDROID_HOME%\build-tools\19.1.0
- Note:
build-tools文件下19.1.0是此版本的路径,不同的版本文件名可能不一致,所以此处修改为安装对应版本下的文件夹名
- Note: After editing the Path environment variable, click OK to save.
- Verify whether the environment variables are configured successfully, enter cmd with win+r, open the cmd window and enter:
adb version
- Displaying the version of adb indicates that the configuration is successful. Displaying that the adb version is not an internal or external command indicates that the configuration is not successful.
- Displaying the version of adb indicates that the configuration is successful. Displaying that the adb version is not an internal or external command indicates that the configuration is not successful.