zoukankan      html  css  js  c++  java
  • 解决android studio引用远程仓库下载慢(JCenter下载慢)

    使用开源中国的maven库

    阿里云的(速度飞快):http://maven.aliyun.com/nexus/content/groups/public/

    修改项目根目录下面的build.gradle文件,将jcenter()库注释掉,添加阿里的maven库,同时保留Google的maven库地址即可。

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    buildscript {
        repositories {
            google()
            //jcenter()
            maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}       
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.3.0'        
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            google()
         //jcenter()
            maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }

     另一个方法,在android studio的设置里面添加如下设置,下次就不用再改动这个文件了

  • 相关阅读:
    VERSIONINFO Resource
    WCF 学习文摘
    hook 学习
    COM 学习
    ActiveX开发
    Word 开发资料集合
    Loops with PL/SQL
    TWain 在 Qt4 中的调用方法
    从 TWAIN 设备中扫描图像
    Qt enum使用总结
  • 原文地址:https://www.cnblogs.com/tsts/p/11029182.html
Copyright © 2011-2022 走看看