最新 Android studio添加阿里云仓库

在工程的settings.gradle中添加
pluginManagement {
        repositories {
                gradlePluginPortal()
                google()
                mavenCentral()
            }
}
dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
                maven {
                        allowInsecureProtocol = true
                        url 'http://maven.aliyun.com/nexus/content/groups/public/'
                    }
                maven {
                        allowInsecureProtocol = true
                        url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'
                    }
                maven {
                        allowInsecureProtocol = true
                        url 'http://maven.aliyun.com/nexus/content/repositories/google'
                    }
                maven {
                        allowInsecureProtocol = true
                        url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin'
                    }
                google()
                mavenCentral()
                maven { url 'https://jitpack.io' }
            }
}
rootProject.name = "lemon"
include ':app'

你可能感兴趣的:(安卓,android,studio,阿里云,android)