小编Nic*_*cky的帖子

gradle.properties 与 buildscript ext 哪个更好

gradle.properties 代码片段

APP_BUILD_COMPILE_SDK_VERSION=28
APP_BUILD_TOOLS_VERSION = 27.0.3

APP_BUILD_MIN_SDK_VERSION = 16
APP_BUILD_TARGET_SDK_VERSION = 28

supportLibraryVersion = '23.4.0'
playServicesVersion = '9.2.1'
Run Code Online (Sandbox Code Playgroud)

buildscript ext 代码片段

ext {
    // sdk and tools
    minSdkVersion = 14
    targetSdkVersion = 23
    compileSdkVersion = 23
    buildToolsVersion = '23.0.2'

    // dependencies versions
    supportLibraryVersion = '23.4.0'
    playServicesVersion = '9.2.1'
}
Run Code Online (Sandbox Code Playgroud)

我在不同的项目中都使用过,但有人知道它们的最大区别是什么吗?

android build.gradle android-gradle-plugin

5
推荐指数
1
解决办法
663
查看次数