最近總是遇到無法下載jcenter下的庫文件,有點煩人,百度到一個方法:
給jcenter手動添加上地址:
buildscript {
repositories {
jcenter(){ url 'http://jcenter.bintray.com/'}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter(){ url 'http://jcenter.bintray.com/'}
}
}
就這樣,就可以了。默認是https的,as下載的時候,會被refused。
同樣道理的還有gradle-2.3.0.zip等
解決方法:

就是這樣,將https,替換成http,as沒有證書,會被拒的。手動下載,在本地建服務器,在這里定向過去,也是一種方法。
