码迷,mamicode.com
首页 > 移动开发 > 详细

Android使用阿里镜像

时间:2020-02-01 23:36:47      阅读:212      评论:0      收藏:0      [点我收藏+]

标签:span   type   排查   gradle   导致   evel   http   project   groups   

在学习room时项目一直在编译中,最后排查发现是依赖没有下载完导致。随后查询将依赖下载源改为阿里源,即可正常使用。

需要修改 build.gradle (project),改为以下内容:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        maven { url ‘http://maven.aliyun.com/nexus/content/groups/public/‘ }
        maven { url ‘http://maven.aliyun.com/nexus/content/repositories/jcenter‘ }
        google()
        //jcenter()
        
    }
    dependencies {
        classpath ‘com.android.tools.build:gradle:3.5.3‘
        
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url ‘http://maven.aliyun.com/nexus/content/groups/public/‘ }
        maven { url ‘http://maven.aliyun.com/nexus/content/repositories/jcenter‘ }
        google()
        //jcenter()
        
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

 

Android使用阿里镜像

标签:span   type   排查   gradle   导致   evel   http   project   groups   

原文地址:https://www.cnblogs.com/wuren-best/p/12250357.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!