JCenter下载太慢?教你修改Maven仓库地址为国内镜像

    xiaoxiao2021-04-14  44

    解决方法一:

    https:改成 http协议下载

    下文介绍部分来源自:https://my.oschina.net/lifj/blog/754861

    下面是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 }

    希望能帮到大家。

    解决方法二:

    改成开源中国maven镜像,这个方法没试过,不知道好不好用,需要的同学,可以自行测试

    http://blog.csdn.net/biezhihua/article/details/49668605

    转载请注明原文地址: https://ju.6miu.com/read-670537.html

    最新回复(0)