跳到主要内容

完整简单项目下的build.gradle

buildscript {

repositories {

// 添加阿里云 maven 地址

maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }

maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }

// jcenter()

google()

}

dependencies {

classpath 'com.android.tools.build:gradle:3.4.2'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files这里的3.4.2是和gradle 5.1.1对应的,请勿随便修改

}

}

allprojects {

repositories {

// 添加阿里云 maven 地址

maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }

maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }

// jcenter()

google()

}

}

task clean(type: Delete) {

delete rootProject.buildDir

}