这个配置是我目前用的速度最快的和最稳定的
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
// jcenter()
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/'}
// maven { url 'https://maven.google.com' } //添加此行
maven { url "https://www.jitpack.io" }
// maven { url "https://dl.bintray.com/drummer-aidan/maven/" }
// jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}