AS解決無法下載jcenter下的文件


最近總是遇到無法下載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沒有證書,會被拒的。手動下載,在本地建服務器,在這里定向過去,也是一種方法。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM