Android Studio Gradle构建很慢,下载依赖缓慢问题

2023-12-16 15:36:23

在项目的 build.gradle或setting.gradle(Android Studio新老版本配置不同)中配置镜像源

阿里云:

maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/spring-plugin' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://jitpack.io' }

或

maven { url=uri("https://maven.aliyun.com/repository/gradle-plugin") }
maven { url=uri("https://maven.aliyun.com/repository/spring-plugin") }
maven { url=uri("https://maven.aliyun.com/repository/google") }
maven { url=uri("https://maven.aliyun.com/repository/central") }
maven { url=uri("https://maven.aliyun.com/repository/jcenter") }
maven { url=uri("https://maven.aliyun.com/repository/public") }
maven { url=uri("https://jitpack.io")}

文章来源:https://blog.csdn.net/yzhj2005/article/details/135031973
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。