What are the Android SDK build-tools, platform-tools and tools? And which version should be used?

前端 未结 6 1783
北荒
北荒 2020-11-28 17:27

I know this is a very rudimentary question, but to my surprise, I could not find any document about Android SDK Build-tools. Besides Android SDK Tools and Android SDK Platfo

6条回答
  •  悲哀的现实
    2020-11-28 17:59

    About the version of Android SDK Build-tools, the answer is

    By default, the Android SDK uses the most recent downloaded version of the Build Tools.

    Source

    In Eclipse, you can choose a specific version by using the sdk.buildtools property in the project.properties file.

    There seems to be no official page explaining all the build tools. Here is what the Android team says about this.

    The [build] tools, such as aidl, aapt, dexdump, and dx, are typically called by the Android build tools or Android Development Tools (ADT), so you rarely need to invoke these tools directly. As a general rule, you should rely on the build tools or the ADT plugin to call them as needed.

    Source

    Anyway, here is a synthesis of the differences between tools, platform-tools and build-tools:

    • Android SDK Tools
      • Location: $ANDROID_HOME/tools
      • Main tools: ant scripts (to build your APKs) and ddms (for debugging)
    • Android SDK Platform-tools
      • Location: $ANDROID_HOME/platform-tools
      • Main tool: adb (to manage the state of an emulator or an Android device)
    • Android SDK Build-tools
      • Location: $ANDROID_HOME/build-tools/$VERSION/
      • Documentation
      • Main tools: aapt (to generate R.java and unaligned, unsigned APKs), dx (to convert Java bytecode to Dalvik bytecode), and zipalign (to optimize your APKs)

提交回复
热议问题