Android国内Maven仓库
central https://maven.aliyun.com/repository/central
jcenter https://maven.aliyun.com/repository/public
public https://maven.aliyun.com/repository/public
google https://maven.aliyun.com/repository/google
gradle-plugin https://maven.aliyun.com/repository/gradle-plugin
spring https://maven.aliyun.com/repository/spring
spring-plugin https://maven.aliyun.com/repository/spring-plugin
grails-core https://maven.aliyun.com/repository/grails-core
apache snapshots https://maven.aliyun.com/repository/apache-snapshots
在android studio的工程中,你需要在build.gradle中添加
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
}
}
allprojects {
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
google()
jcenter()
}
}