Android开发JCenter仓库替换华为云或阿里云镜像仓库

项目build.gradle 配置文件:

buildscript {
    repositories {
        // 阿里云云效仓库:https://maven.aliyun.com/mvn/guide
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
        maven { url 'https://maven.aliyun.com/repository/google' }
        // 华为开源镜像:https://mirrors.huaweicloud.com
        maven { url 'https://repo.huaweicloud.com/repository/maven' }
        // JitPack 远程仓库:https://jitpack.io
        maven { url 'https://jitpack.io' }
        // MavenCentral 远程仓库:https://mvnrepository.com
        mavenCentral()
        google()
        jcenter()
    }
}

allprojects {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/jcenter' }
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://repo.huaweicloud.com/repository/maven' }
        maven { url 'https://jitpack.io' }
        mavenCentral()
        google()
        jcenter()
    }
}

配置文件来源:JCenter 迁移指南 - (jianshu.com)

你可能感兴趣的:(Android开发JCenter仓库替换华为云或阿里云镜像仓库)