我知道这是一个非常基本的问题,但令我惊讶的是,我找不到任何关于Android SDK构建工具的文档。 除了Android SDK Tools和Android SDK Platform-tools,还有一堆Android SDK Build-tools,如图所示。有没有人能指出一个来源来解释所有这些,并帮助澄清一个特定版本的Android SDK构建工具是如何被选择使用的?
编辑(2014-02-27):
我仍然没有完全理解所有的工具。以下是我根据谷歌最新的资料所作的有限了解:
Android SDK Build-tools used to be components of Android SDK Platform-tools. They have been decoupled from Android SDK Platform-tools, so that the build tools can be updated independently of the integrated development environment (IDE) components. Android SDK Platform-tools are customized to support the features of the latest Android platform. They are backward compatible so that you always use the latest update of Android SDK Platform-tools even your app targets older Android platforms. SDK tools are platform independent and are required no matter which Android platform you are developing on.
I still do not understand the rationale of taking Android SDK Build-tools out of Android SDK Platform-tools which has a single instance and is easy to manage the update. The only possible reason that I can think of is that some apps have to rely on older build components to build them. Google's document mentions this, but does not explain why. Looking at the release notes, you will notice that updates of Android SDK Build-tools are primarily for fixing bugs or/add support for new platforms. The only reason that I can think of for some apps to use older versions of Android SDK Build-tools is that they rely on certain bugs of Android SDK Build-tools. These apps would not function normally without being built with these bugs. I wish Google could explain this better by giving one or two examples showing why these bugs in the tools are critical for certain apps.