返回顶部
首页 > 资讯 > 移动开发 >解决Android Studio(2022版)gradle下载慢问题
  • 313
分享到

解决Android Studio(2022版)gradle下载慢问题

javagradleandroidstudiomaven 2023-09-02 09:09:59 313人浏览 泡泡鱼
摘要

由于新版AS将allprojects独立出来变为setting.gradle, 所以我们只需要更改setting.gradle即可: 将以下对应阿里云镜像添加到Google和MavenCentral上方,优先

由于新版AS将allprojects独立出来变为setting.gradle, 所以我们只需要更改setting.gradle即可:

将以下对应阿里云镜像添加到Google和MavenCentral上方,优先从国内源下载,如果没有再去原网站下。

maven { url 'https://maven.aliyun.com/repository/google' }maven { url 'Https://maven.aliyun.com/repository/public' }
pluginManagement {    repositories {        gradlePluginPortal()        maven { url 'https://maven.aliyun.com/repository/google' }        maven { url 'https://maven.aliyun.com/repository/public' }        google()        mavenCentral()//        jcenter()    }}dependencyResolutionManagement {    repositoriesMode.set(RepositoriesMode.FaiL_ON_PROJECT_REPOS)    repositories {        maven { url 'https://maven.aliyun.com/repository/google' }        maven { url 'https://maven.aliyun.com/repository/public' }        google()        mavenCentral()    }}

附其它源地址和阿里云地址的对应关系网址:

仓库服务 (aliyun.com)

仓库名称

阿里云仓库地址

阿里云仓库地址(老版)

源地址

central

https://maven.aliyun.com/repository/central

https://maven.aliyun.com/nexus/content/repositories/central

Central Repository:

jcenter

https://maven.aliyun.com/repository/public

https://maven.aliyun.com/nexus/content/repositories/jcenter

http://jcenter.bintray.com/

public

https://maven.aliyun.com/repository/public

https://maven.aliyun.com/nexus/content/groups/public

central仓和jcenter仓的聚合仓

google

https://maven.aliyun.com/repository/google

https://maven.aliyun.com/nexus/content/repositories/google

https://maven.google.com/

gradle-plugin

https://maven.aliyun.com/repository/gradle-plugin

https://maven.aliyun.com/nexus/content/repositories/gradle-plugin

https://plugins.gradle.org/m2/

spring

https://maven.aliyun.com/repository/spring

https://maven.aliyun.com/nexus/content/repositories/spring

http://repo.spring.io/libs-milestone/

spring-plugin

https://maven.aliyun.com/repository/spring-plugin

https://maven.aliyun.com/nexus/content/repositories/spring-plugin

http://repo.spring.io/plugins-release/

grails-core

https://maven.aliyun.com/repository/grails-core

https://maven.aliyun.com/nexus/content/repositories/grails-core

JFrog

apache snapshots

https://maven.aliyun.com/repository/apache-snapshots

https://maven.aliyun.com/nexus/content/repositories/apache-snapshots

Index of /groups/snapshots

------------------------------------------------------更新Kotlin版本设置-------------------------------------------------

maven(url = "https://maven.aliyun.com/repository/google")maven(url = "https://maven.aliyun.com/repository/public")

来源地址:https://blog.csdn.net/LYFly0016/article/details/129222714

--结束END--

本文标题: 解决Android Studio(2022版)gradle下载慢问题

本文链接: https://lsjlt.com/news/390453.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作