Android studio 下载第三方库下载不下来 推荐阿里镜像

在build.gradle 中添加如下
镜像地址:

maven {
url “http://maven.aliyun.com/nexus/content/groups/public/”
}

// 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/"
        }
        google()
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        
        // 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/"
        }
        google()
        jcenter()
        
    }
}

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

猜你喜欢

转载自blog.csdn.net/yanwenyuan0304/article/details/106021538