Android Basics--Android SDK manager detailed
When doing Android development, it is unavoidable to use the Android SDK Manager, install the required SDK version, Buildtools version and so on.
Displays all of the 2016.11.16 Android SDK Manager package. Many new Android developers may wonder when they are using it: what are the functions of the package? This article will take you through the puzzle (if you just want to know which package you need to install, skip to the end of the article).
1. SDK Manager directory structure
The package directory structure of the SDK Manager is shown in the following two images
Can be broadly divided into tools, platforms, and extras three parts. After installing the required package, Android Studio will create the corresponding file directory locally, which is the directory structure on the PC after some of the package has been installed by Bo Master:
With local files, we can see what features will be provided after the install of a package, and it is not difficult to find the corresponding kit by the name of the folder, such as three blocks of red circled, it is easy to know the tools directory from the SDK manager. Below we will show you more about SDK Manager by looking at the local files in tools, platforms, and extras.
1. Tools
The Tools folder includes three types of Tools:android SDK Tools,android SDK Platform-tools and Android SDK Build-tools. Corresponds to the Tools,platform-tools and Build-tools of the local folder.
Android SDK Tools
The storage directory for the local folder for Android SDK Tools is as follows:
SDK Tools includes a number of important tools, such as: Ddms for launching Android Debugging tools Draw9patch is a tool for drawing Android platforms. 9 diagram; Monkeyrunner is a good stress test tool that simulates the user's random key on the phone, Mksdcard is the simulator SD image creation tool, emulator is Android SDK emulator main program; TraceView is an important debugging tool on the Android platform that lists the events used by each method call, and the expansion method can also see the percentage of time that the method is being called by other methods, so you know that the method uses the most resources. It can then be optimized or removed from the main thread. Other tools will not be introduced, interested in their own understanding.
This shows that the SDK tools need to be installed.
Android SDK Platform-tools
The file directory for the local folder of the SDK Platform-tools
Platform-tools also contains a number of important tools: The ADB is an Android debugging tool that communicates with the simulator or a connected phone in the form of a command line, and Sqlite3 helps developers view other tools such as the SQLite database on their PC. Ditto, other tools can be found in Google's developer documentation.
The SDK Platform-tools also needs to be installed.
Android SDK Build-tools
Unlike Android SDK Build-tools and Android SDK tools and Android SDK Platform-tools, Android SDK Managert retains the Android SDK Build-too The old version of LS, while the other two types of tools only provide the latest version of update. There are several versions of the Build-tools installed on the blogger's computer:
The early build-tools were placed in the Platform-tools, 2013 years later in order to
The compilation-related components are decoupled from the Platform-tools component, and Google creates a new Build-tools store, and Build-tools can be updated independently of the IDE.
Decoupled the build-specific components of the Android SDK from the Platform-tools component, so that the build tools can be updated independently of the integrated development environment (IDE).
Why Build-tools need to keep the old version, stack Overflow's explanation is to maintain backward compatibility, the new build-tools may remove some features of the old version, at this time for the old version of the Build-tools build project, You have to use the old version.
They keep the old build tools because as they update the tools, some features become deprecated. But app developers might has source code that relies on those features so they keep the old versions available to support Those old code bases.
The build-tools of the blogger's version 24.0.2 contains the following tools:
Including AAPT (Android Asset packaging tool) Android Resource Pack tool: Compile the application's resource file (including Androidmanifest.xml and your activitiy XML file), generate the R.java file, so you Resources can be referenced from your Java code; AIDL: Convert. Aidl interface to Java interface; DX: Conversion. Class Intermediate code is Dvlik intermediate code, all Java-compiled build. class files require this tool for conversion, and finally packaged into the APK file medium Tools and more.
In summary, Bo Master proposed to create a new project as far as possible to use the latest version of the Build-tools, a new version of the repair boss some bugs, two is the function and performance will be improved.
2. Platforms
Each Android version corresponds to a platforms version, the 2016.11.16 official release of the SDK version can be selected from Android 2.1 to the latest Android 7.1.1. Each version of platforms also includes the SDK platform,document,sources of the Android SDK and the system Image.
- SDK Platform
This is a good understanding, is the version of the SDK, must be installed
- Document
Offline documentation for easy access to API usage instructions
- Sources
Source code, one is to learn Google excellent source code, two is to view the source of convenient debugging error.
- System Image
A compiled system image, the simulator can be loaded directly, generally do not need to install, the creation of the required simulator in the acquisition is not too late. After Android Studio 2.0, the official simulator has been very easy to use, the individual feel can not genymotion.
3. Extras
Extras contains a lot of blahblahblah, the more important is the three Android support Repository, the Android support Library, Google Repository. To know the difference between the three, you need to know the difference between Android studio and Eclipse when building Android projects. As is built with Gradle, and Eclipse is built with Ant. So Google offers respository for Android Studio, and the library for Eclipse.
Android Support Repository
Contains a local Maven repository that supports libraries, which provides a rich set of APIs that are compatible with most versions of Android. This tool is an essential tool for Android Wear, Android TV, and Google Cast products. Google's offer of Android support Repository is based on the following three considerations: Backwards compatibility-new features added by the SDK can be seen in the Legacy SDK, and features that are not suitable for packaging into the framework- Some of the non-mandatory features are available to developers using Android support Repository, in order to enable different forms of devices-as mentioned above, the difference between different devices is implemented by the supporting repository. Android support repository currently contains a library of 13 classes, and we commonly use V4, V7,V13, for these three supporting libraries. For more detailed information about Android support Repository, refer to the Android Support Library's past life.
Google Repository
The repository provides a variety of features and services for your app, including Firebase, Google maps, game achievements, leaderboards, and more.
In addition to these three phone simulators that are used by Intel x86 Emulator Accelerator to accelerate the Intel x86 architecture, you can install them if necessary.
4. Summary
Having said so much, a picture outlines the role that the Android SDK manager plays in the knowledge-Kang Jianwei Summary:
The birth of this article is to thank
1. What is in the Android SDk Manager that must be downloaded?
2. What is the Android SDK build-tools, platform-tools and tools? And which version should be used?
3. Update the IDE and Tools
4. The role of each directory in the Android SDK
5. Android Support Library's past life
6. Android What's the difference between Android support Repository vs Android support Library vs Google Repository vs Go Ogle Play Services
Very ashamed, made a small contribution!
Ref: 53178602
Android SDK Manager detailed