Android 项目的 build.gradle 中的 buildtoolsVersion 与 compileSdkVersion 有什么区别?
What's the difference between buildtoolsVersion vs compileSdkVersion in the build.gradle for an Android project?
具体来说,我想澄清一下构建工具是什么?
Specifically, I'd like clarification on what the build tool is?
compileSdkVersion 是您编译的 Android API 版本.
compileSdkVersion is the API version of Android that you compile against.
buildToolsVersion 是您要使用的编译器(aapt、dx、renderscript 编译器等)的版本.对于每个 API 级别(从 18 开始),都有一个匹配的 .0.0 版本.
buildToolsVersion is the version of the compilers (aapt, dx, renderscript compiler, etc...) that you want to use. For each API level (starting with 18), there is a matching .0.0 version.
在 IO 2014 上,我们发布了 API 20 和构建工具 20.0.0.
At IO 2014, we release API 20 and build-tools 20.0.0 to go with it.
在 Android 版本之间,我们将发布编译器的更新,因此我们将发布 .0.1、.0.2 等版本...因为我们不想在您的领导下默默更新这些版本,所以由您决定方便时移至新版本.
Between Android releases we will release updates of the compilers, and so we'll release version .0.1, .0.2, etc... Because we don't want to silently update these version under you, it's up to you to move to the new version when it's convenient for you.
您可以使用比您的 compileSdkVersion 更高版本的构建工具,以便在不更改构建应用程序的基础上选择新的/更好的编译器.
You can use a higher version of the build-tools than your compileSdkVersion, in order to pick up new/better compiler while not changing what you build your app against.
这篇关于Android gradle:buildtoolsVersion 与 compileSdkVersion的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
更新到 Android Build Tools 25.1.6 GCM/FCM 后出现 IncompIncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出现 Incompatible
如何在 gradle 中获取当前风味How to get current flavor in gradle(如何在 gradle 中获取当前风味)
如何修复“意外元素<查询>在“清单How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修复“意外元素lt;查询gt;在“清单中找到错误
基于 Android Gradle 中多风味库的多风味应用Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多风味库的多风味应用)
Android 依赖在编译和运行时有不同的版本Android dependency has different version for the compile and runtime(Android 依赖在编译和运行时有不同的版本)
本地 aar 库的传递依赖Transitive dependencies for local aar library(本地 aar 库的传递依赖)