将app下的build.gradle中的fileallprojects和task clean的部分改为下述代码
fileallprojects {
repositories {
// maven库
def cn = "http://maven.aliyun.com/nexus/content/groups/public/"
def abroad = "http://central.maven.org/maven2/"
// 先从url中下载jar若没有找到,则在artifactUrls中寻找
maven {
url cn
artifactUrls abroad
}
maven { url "http://maven.aliyun.com/nexus/content/repositories/jcenter"}
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}