今天导入一个工程到 studio, 一直卡在下载那块.
看到下载地址是:
- https://jcenter.bintray.com/........
- https!!!!
到浏览器下载, 果然也下载不下来..
于是把 https 换成 http, 到浏览器下载, 很快就能下载下来..
好的, 怎么修改成 http 呢? 我找了半天没找到. 结果, 尝试了一下, OK 了!!!
下面是 build.gradle 的内容: 主要增加了 jcenter(){url 'http://jcenter/bintray.com/'}
- // Top-level build file where you can add configuration options common to all sub-projects/modules.
- buildscript {
- repositories {
- jcenter(){ url 'http://jcenter.bintray.com/'}
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:2.0.0'
- // 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/'}
- }
- }
- task clean(type: Delete) {
- delete rootProject.buildDir
- }
希望能帮到大家.
来源: http://www.bubuko.com/infodetail-2646357.html