在android开发中,因为各种原因,时常编译速度缓慢甚至卡住不动,切换到阿里云maven仓库之后,则可以提升编译速度。
https://maven.aliyun.com/repository/google
jcenter
https://maven.aliyun.com/repository/public
public(central仓和jcenter仓的聚合仓)
https://maven.aliyun.com/repository/public
gradle-plugin
https://maven.aliyun.com/repository/gradle-plugin
jcenter和public二选一即可。
build.gradle
buildscript { repositories { maven { url 'https://maven.aliyun.com/repository/public' } maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } mavenLocal() mavenCentral() google() jcenter() ... } } allprojects { repositories { maven { url 'https://maven.aliyun.com/repository/public' } maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } mavenLocal() mavenCentral() google() jcenter() ... } }