解决Android Gradle下载依赖项慢的问题
at 2023-03-03 09:48:44, by 鹏城奋青
使用国内源,把工程中所有repositories换成以下配置,
repositories {
// 源: https://repo1.maven.org/maven2/
maven {
url "http://maven.aliyun.com/repository/central"
allowInsecureProtocol true
}
// 源: https://maven.google.com/
maven {
url "http://maven.aliyun.com/repository/google"
allowInsecureProtocol true
}
// 源: https://plugins.gradle.org/m2/
maven {
url "http://maven.aliyun.com/repository/gradle-plugin"
allowInsecureProtocol true
}
// 源: http://jcenter.bintray.com/
maven {
url "http://maven.aliyun.com/repository/jcenter"
allowInsecureProtocol true
}
// 源: central和jcenter的聚合
maven {
url "http://maven.aliyun.com/repository/public"
allowInsecureProtocol true
}
// 源: github
maven {
url 'https://jitpack.io'
allowInsecureProtocol true
}
maven {
url 'http://maven.aliyun.com/nexus/content/repositories/releases'
allowInsecureProtocol true
}
google()
mavenCentral()
}