"Could not run phased build action using connection to Gradle distribution"
"Could not run phased build action using connection to Gradle distribution"
我在全新安装 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->刷新 Gradle 项目"。
我也试过这个:
我的 Java 安装是干净的:
java version "16.0.1" 2021-04-20
& 已确认 Eclipse 指向它(“首选项->Java->已安装的 JRE”)。
安装详情:
Buildship: Eclipse Plug-ins for Gradle 3.1.5.v20210113-0929
Eclipse IDE for Java Developers 4.20.0.20210612-1200
Windows10.
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.
Java 支持 16 开头 Gradle 7
“在以前的 Gradle 版本中,运行 Gradle 本身在 Java 16 上导致错误。”
感谢 LMC。我将项目 prefs->Gradle 从 Wrapper 更改为 Specific=7.1.1 :
我在全新安装 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->刷新 Gradle 项目"。
我也试过这个:
我的 Java 安装是干净的:
java version "16.0.1" 2021-04-20
& 已确认 Eclipse 指向它(“首选项->Java->已安装的 JRE”)。
安装详情:
Buildship: Eclipse Plug-ins for Gradle 3.1.5.v20210113-0929
Eclipse IDE for Java Developers 4.20.0.20210612-1200
Windows10.
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.
Java 支持 16 开头 Gradle 7
“在以前的 Gradle 版本中,运行 Gradle 本身在 Java 16 上导致错误。”
感谢 LMC。我将项目 prefs->Gradle 从 Wrapper 更改为 Specific=7.1.1 :