Android gradle: buildtoolsVersion vs compileSdkVersion

前端 未结 2 1422
慢半拍i
慢半拍i 2020-11-28 02:59

What\'s the difference between buildtoolsVersion vs compileSdkVersion in the build.gradle for an Android project?

EDIT: Specifically, I\'d

2条回答
  •  忘掉有多难
    2020-11-28 03:58

    Android Studio 3.0 update

    It is no longer as important to know the exact buildToolsVersion as it used to be because it is now chosen automatically.

    The documentation says:

    You no longer need to specify a version for the build tools (so, you can now remove the android.buildToolsVersion property). By default, the plugin automatically uses the minimum required build tools version for the version of Android plugin you're using.

    Finding the exact version number

    I originally came here looking for how to know the exact version number of the most recent Build Tools Version (back in the days when this needed to be updated manually). If you still need to do this, you can find it in the following way:

    Go to Tools > SDK Manager > SDK Tools (tab). Select Android SDK Build Tools from the list and check Show Package Details. The last item will show the most recent version.

    In the image above, I can see that I have buildToolsVersion 27.0.3 installed. There is a more recent rc (release candidate) version, but I haven't installed it. I will when the stable version comes out.

提交回复
热议问题