3

I think I can install more versions of Android installing the "SDK Platform" option of every version. But need I more? What are the Build-tools?

For example, I want that my app support Android 7.1.1 (API version: 25), so I install its "SDK Platform", but in the Tools folder I have multiple build-tools for the API version 25: 25, 25.0.1, 25.0.2 and 25.0.3. What is a correct installation with Xamarin?

Screenshot here

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
John Doe
  • 483
  • 4
  • 10

2 Answers2

2

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.

Jon Douglas
  • 13,006
  • 4
  • 38
  • 51
0

What I found from the link @ article is that

  • You should AWLAYS install the latest version which will be used by default during compilation.
  • If your project depends on an older version, the SDK Manager allows you to install and maintain separate versions.

More info: https://developer.android.com/tools/revisions/build-tools.html

Venkataramana Madugula
  • 13,199
  • 2
  • 18
  • 22