解决Android Studio项目初始化下载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
 
 

posted on 2024-11-05 09:41  zhangzongshan  阅读(219)  评论(0编辑  收藏  举报

导航