在build.gradle 中加入
mavenCentral() maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }//阿里云镜像服务
如下:
buildscript {
repositories {
mavenCentral()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }//阿里云镜像服务
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }//阿里云镜像服务
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}