当前位置:   article > 正文

org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription() IDEA构建gradle项目报错_idea gradle in the case of corrupt gradle processe

idea gradle in the case of corrupt gradle processes you can also try closing

一、问题

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.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

二、原因

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

三、解决方案

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

在这里插入图片描述

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

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/382250
推荐阅读
相关标签
  

闽ICP备14008679号