Android Studio Maven仓库国内镜像
2019-10-13 本文已影响0人
缺牙青蛙
个人原创,转载请注明出处:https://www.jianshu.com/p/061d024ee6c7
在project级别的build.gradle文件加入以下代码替换google()
与jcenter()
:
buildscript {
...
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
mavenLocal()
mavenCentral()
//google()
//jcenter()
}
...
}
allprojects {
...
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
mavenLocal()
mavenCentral()
//google()
//jcenter()
maven { url "https://www.jitpack.io" }
}
...
}