国内好像不能访问https://maven.google.com,导致Android Studio一值在编译.
在google cn 上偶然发现例一个替代网址 ‘https://dl.google.com/dl/android/maven2/’ .
使用这个就可以了。
也就是把maven { url ‘https://maven.google.com’ }替换成注释的就可以了。
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
// maven { url 'https://dl.google.com/dl/android/maven2/' }
}
}
参考网址:https://developer.android.google.cn/studio/build/dependencies.html
下图截自参考网址