解决Android Studio项目初始化下载gradle过慢问题
解决方法
将谷歌官方源替换为国内阿里云或者腾讯云源
- 解决方案替换掉谷歌原地址:
- 官网地址:https://services.gradle.org/distributions/
- 阿里云镜像 Gradle下载地址:https://mirrors.aliyun.com/macports/distfiles/gradle/
- 腾讯镜像 Gradle下载地址:https://mirrors.cloud.tencent.com/gradle/
项目目录结构:
编辑gradle配置文件: 根目录-> gradle-> wrapper-> gradle-wrapper.properties
谷歌官方:
#Wed Oct 09 16:40:21 CST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
修改为阿里云源:
#Wed Oct 09 16:40:21 CST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://mirrors.aliyun.com/macports/distfiles/gradle/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
修改为腾讯云源:
#Wed Oct 09 16:40:21 CST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
标签:dists,wrapper,GRADLE,Studio,https,HOME,Android,gradle
From: https://www.cnblogs.com/henry-0316/p/18454755