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

前端 未结 6 1774
北荒
北荒 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:43

    I'll leave the discussion of the difference between Build Tools, Platform Tools, and Tools to others. From a practical standpoint, you only need to know the answer to your second question:

    Which version should be used?

    Answer: Use the most recent version.

    For those using Android Studio with Gradle, the buildToolsVersion has to be set in the build.gradle (Module: app) file.

    android {
        compileSdkVersion 25
        buildToolsVersion "25.0.2"
    
        ...
    }
    

    Where do I get the most recent version number of Build Tools?

    Open the Android SDK Manager.

    • In Android Studio go to Tools > Android > SDK Manager > Appearance & Behavior > System Settings > Android SDK
    • Choose the SDK Tools tab.
    • Select Android SDK Build Tools from the list
    • Check Show Package Details.

    The last item will show the most recent version.

    Make sure it is installed and then write that number as the buildToolsVersion in build.gradle (Module: app).

提交回复
热议问题