在Android Studio中设置Gradle版本
image.png由上图我们可以看到两个版本设置,Gradle version和 Android Plugin Version,
第一个为Gradle版本,
第二个为Gradle Plugin版本分别对应下面两个文件:
- gradle-wrapper.properities
#Tue Dec 11 11:15:57 CST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
- build.gradle(top-level)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
image.png
官方详细信息
https://developer.android.google.cn/studio/releases/gradle-plugin#revisions
网友评论