• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription() IDEA构建gradle项目报错

武飞扬头像
+木易成+
帮助1

一、问题

github上下载的gradle项目,在idea构建时候报错,如下

Unable to find method 'org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription()Ljava/lang/String;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

二、原因

IDEA的版本和gradle的版本不兼容,需要降低gradle的版本或者升级Idea的版本(本人用的IDEA2019,gradle版本从7.4降为6.9.3)

三、解决方案

方式一:修改idea默认gradle配置

学新通

方式二 修改项目默认的gradle版本(前提上面的图片下拉项选的第一个)

学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgcekak
系列文章
更多 icon
同类精品
更多 icon
继续加载