Android stdio 配置阿里云镜像

遇到android stdio下载依赖超时,配置阿里云的镜像。

在setting.gradle文件中配置
使用http地址需要添加 allowInsecureProtocol = true

pluginManagement {
    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'
        }
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
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'
        }
        google()
        mavenCentral()
    }
}

 

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享