【转】Idea 下载安装 Gradle

推荐下载地址(腾讯镜像):https://mirrors.cloud.tencent.com/gradle

在里面搜索对应版本号进行下载,比如 gradle-7.5.1-bin.zip

下载后直接将压缩包移动到 C:\Users\{User Name}\.gradle\wrapper\dists\gradle-7.5.1-bin\7jzzequgds1hbszbhq3npc5ng 

然后重新加载 Gradle 项目,或者重新打开 Idea ,就可以了。

 

 

 

转自:https://blog.csdn.net/youngwah292/article/details/110734407

另外,建议在 build.gradle 文件中加入以下代码,以使用阿里云的 Gradle 仓库服务:

allprojects {
  repositories {
    maven {
      url 'https://maven.aliyun.com/repository/public/'
    }
    mavenLocal()
    mavenCentral()
  }
}

参考:https://developer.aliyun.com/mvn/guide

参考:https://developer.aliyun.com/article/1552783

参考:https://developer.aliyun.com/article/1552521

在项目里的 settings.gradle 文件中添加一行:

pluginManagement {
    repositories {
        // 添加阿里云镜像
        maven { url = uri("https://maven.aliyun.com/repository/public/") }
        mavenCentral()
        gradlePluginPortal()
    }
}

 

posted on 2024-02-20 22:31  z5337  阅读(674)  评论(0)    收藏  举报