android studio gradle 加载慢国内镜像解决(2022版)

settings.gradle

设置 包 的国内镜像

pluginManagement {
    repositories {
    
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }

        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
    
        maven { url 'https://maven.aliyun.com/repository/google' }
        maven { url 'https://maven.aliyun.com/repository/public' }
        
        google()
        mavenCentral()
    }
}
rootProject.name = "hiCompose"
include ':app'
 

你可能感兴趣的:(android,课件开放,android,studio,android,ide)