使用Intellij IDEA运行时ijresolvers.gradle中的Gradle错误

bxfogqkk  于 2023-05-07  发布在  IntelliJ IDEA
关注(0)|答案(4)|浏览(488)

当我直接通过Intellij IDEA运行项目时,它会生成下面的错误。
这个ijresolvers.gradle是自动生成的,所以当我尝试更改它时,IDEA会创建另一个。
输出:

18:16:12: Executing 'run'...

:wrapper

BUILD SUCCESSFUL

Total time: 0.251 secs

FAILURE: Build failed with an exception.

* Where:
Initialization script '/private/var/folders/fp/gn6yng6x3sg1k5dx37jy1bnntsymvt/T/ijresolvers.gradle' line: 331

* What went wrong:
A problem occurred evaluating initialization script.
> No signature of method: org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.whenReady() is applicable for argument types: (SetupUtpTestResultListenerAction) values: [SetupUtpTestResultListenerAction@30600d18]
  Possible solutions: whenReady(groovy.lang.Closure)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 0.154 secs
18:16:15: Execution finished 'run'.

我的配置:

  • MacOS大苏尔
  • Intellij IDEA 2021.3
  • Java 1.8.202
mklgxw1f

mklgxw1f1#

我在类似的环境(Big Sur,IntelliJ 2021.3,Java 1.8,Gradle 3)中遇到了同样的问题,并且在将IntelliJ降级到2021.2版本后能够成功运行Gradle任务

3yhwsihp

3yhwsihp2#

我也遇到了同样的问题(Big Sur/Monterey,IntelliJ 2021.3,Java 1.8,Gradle 3)。我发现解决方案与https://stackoverflow.com/a/70597547/8454898中提到的相同。降级到IntelliJ 2021.2.4在我的情况下工作。

anauzrmj

anauzrmj3#

这似乎是IntelliJ 2021.3中的一个bug。我创建了一个bug报告:https://youtrack.jetbrains.com/issue/IDEA-291112
与此同时,就像其他人已经说过的那样,降级到2021.2似乎是目前唯一的解决方案。
编辑:这只发生在gradle 3.0 -升级到3.1为我修复了它。

jdg4fx2g

jdg4fx2g4#

尝试重建您的IntelliJ Gradle配置。在IntelliJ中,转到File〉Invalidate Caches / Restart,然后Build〉Rebuild Project。这将使IntelliJ与您的Gradle构建文件重新同步。

相关问题