转自:https://blog.csdn.net/kangweijian/article/details/79120849?%3E

 

 

 

使用开源中国的maven库

阿里云的(速度飞快):http://maven.aliyun.com/nexus/content/groups/public/

build.gradle

buildscript {
    repositories {
//        jcenter()
//        jcenter(){ url 'http://jcenter.bintray.com/'}
        maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        maven { url "https://jitpack.io" }
        google()
    }
    dependencies {  
        classpath 'com.android.tools.build:gradle:3.0.0' 
    }
}

allprojects {
    repositories {
//        jcenter()
        maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'} 
        google()
    }
}