1. 程式人生 > >JCenter下載太慢, jcenter修改 https為http也許能幫助你

JCenter下載太慢, jcenter修改 https為http也許能幫助你

ray lds projects -c end pan ldd 下載地址 del

今天導入一個工程到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
}

希望能幫到大家。

JCenter下載太慢, jcenter修改 https為http也許能幫助你