What are the Android SDK Build-tools?
Android SDK Build-tools are a collection of well...Android build tooling.
Location: /build-tools/{VERSION}
Used primarily by Android IDEs/Toolchains to do internal processes. You should always keep these up to date as the Android team will often make enhancements/bug fixes to the tooling to create a faster and more reliable toolchain. The version number typically correlates with the current API level that is being released. At the time of writing, that is API level 26.
You as a developer shouldn't have to worry too much about these tools, but learning about them is never a bad thing.
Let's go through a few of the main items:
aapt/aapt2
- Stands for Android Asset Packaging Tool. This tool is part of the SDK (and build system) and allows you to view, create, and update Zip-compatible archives (zip, jar, apk). It can also compile resources into binary assets.
Note: aapt2 is the second generation of this tooling that enables incremental resource processing.
http://elinux.org/Android_aapt
dx
- Used to convert Java bytecode to Dalvik bytecode (.class -> .dex)
https://stackoverflow.com/a/23936884/1048571
zipalign
- Is an archive alignment tool that provides important optimization to Android application (APK) files. The purpose is to ensure that all uncompressed data starts with a particular alignment relative to the start of the file. Specifically, it causes all uncompressed data within the APK, such as images or raw files, to be aligned on 4-byte boundaries.
https://developer.android.com/studio/command-line/zipalign.html
apksigner
- Android's solution to solving v1(Jar Signing)
and `v2(APK Signature Scheme) in one tool. It allows you to sign APKs and to confirm that an APK's signature will be verified successfully on all versions of the Android platform supported by those APKs.
https://source.android.com/security/apksigning/
mainDexClasses
- Used for generating your main classes.dex
file which is all of the classes your project needs to initially load and run. This is used in the Multidex process(AKA 64k method limit).
https://developer.android.com/studio/build/multidex.html
Note: There are more tools inside, however this is an overview of the tools that are mainly used in Android.