gradle 国内镜像源配置
buildscript {
repositories {
//先从本地加载
mavenLocal()
maven { url 'http://maven.aliyun.com/repository/central' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}
//如有plugins 则需要放在buildscript 后面
plugins{
}
allprojects {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
}
}
参考:
https://blog.csdn.net/zhaokai0130/article/details/81008719