What is the buildToolsVersion for android SDK 24?

社会主义新天地 提交于 2019-12-21 07:26:11

问题


There's not much I can say about this. Oh well. Google released a new version of android called Nougat (android N). It is compileSdkVersion 24. However, on the build tools page in the official documentation, it is not mentioned.

I want to give my app to 100% of the people using Google Play Store, which includes android N users.

tl;dr: What should I fill in the buildToolsVersion field?

Thanks.


回答1:


buildToolsVersion should be set to 25 and 25.0.0, as seen below:

compileSdkVersion 25
buildToolsVersion '25.0.0'
useLibrary 'org.apache.http.legacy'

defaultConfig {
    minSdkVersion 15
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
}

You can get the latest buildToolsVersion from SDK Manager in Android Studio.




回答2:


Using android gradle plugin version > 3 you can remove the android.buildToolsVersion property

Quoting from the New Features section of the Android Gradle plugin release notes for version 3.0.0:

You no longer need to specify a version for the build tools. By default, the plugin automatically uses the minimum required build tools version for the version of Android plugin you're using.



来源:https://stackoverflow.com/questions/38588264/what-is-the-buildtoolsversion-for-android-sdk-24

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!