gpt4 book ai didi

eclipse - "Could not run phased build action using connection to Gradle distribution"

转载 作者:行者123 更新时间:2023-12-04 16:37:22 35 4
gpt4 key购买 nike

安装新的干净 Eclipse 后,我遇到了各种 Gradle 问题。
它们似乎与此“问题”消息相关联:

Could not run phased build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.1.1-bin.zip'.
Initialization script 'Z:\eclipse-workspace\.metadata\.plugins\org.eclipse.buildship.core\init.d\eclipsePlugin.gradle'
Could not compile initialization script 'Z:\eclipse-workspace\.metadata\.plugins\org.eclipse.buildship.core\init.d\eclipsePlugin.gradle'.
startup failed:
General error during semantic analysis: Unsupported class file major version 60
java.lang.IllegalArgumentException: Unsupported class file major version 60
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196)
.....
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:831)
1 error
我已经尝试删除 .gradle 和“Gradle->Refresh Gradle Project”。
我也试过这个:
stackoverflow
我的 Java 安装很干净:
java version "16.0.1" 2021-04-20
& 确认 Eclipse 指向它(“Preferences->Java->Installed JREs”)。
安装细节:
Buildship: Eclipse Plug-ins for Gradle  3.1.5.v20210113-0929
Eclipse IDE for Java Developers 4.20.0.20210612-1200
视窗 10。
Eclipse 安装错误日志:
!ENTRY org.eclipse.buildship.core 2 2 2021-07-09 11:22:05.951
!MESSAGE Initialize project testgradleprj failed due to an error in the referenced Gradle build.
!STACK 0
org.gradle.tooling.BuildException: Could not execute build using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.1.1-bin.zip'.

最佳答案

Gradle 6.8 不适用于 Java 16。
从 Gradle 7 开始支持 Java 16
“在以前的 Gradle 版本中,在 Java 16 上运行 Gradle 本身会导致错误。”
https://docs.gradle.org/7.0/release-notes.html#java-16

关于eclipse - "Could not run phased build action using connection to Gradle distribution",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68321708/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com