Gradle 版本 for Android studio

2019-01-16  本文已影响0人  微罗妮卡

在Android Studio中设置Gradle版本

image.png

由上图我们可以看到两个版本设置,Gradle version和 Android Plugin Version,
第一个为Gradle版本,
第二个为Gradle Plugin版本分别对应下面两个文件:

  1. 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
  1. 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

上一篇下一篇

猜你喜欢

热点阅读