从今天开始我不能再构建我的项目了。其中没有任何变化。看起来一些 Gradle 依赖项是用 Java 11 重新编译的。我使用的是 Java 8 和 Gradle 4.10。
org/eclipse/jgit/storage/file/FileRepositoryBuilder 已由更新版本的 Java 运行时(类文件版本 55.0)编译,此版本的 Java 运行时仅识别最高版本为 52.0 的类文件
有人有同样的问题吗?
./gradlew --version
------------------------------------------------------------
Gradle 4.10.3
------------------------------------------------------------
Build time: 2018-12-05 00:50:54 UTC
Revision: e76905e3a1034e6f724566aeb985621347ff43bc
Kotlin DSL: 1.0-rc-6
Kotlin: 1.2.61
Groovy: 2.4.15
Ant: Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM: 1.8.0_292 (Private Build 25.292-b10)
OS: Linux 4.15.0-142-generic amd64
Run Code Online (Sandbox Code Playgroud)
echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64/
Run Code Online (Sandbox Code Playgroud)
./gradlew clean
FAILURE: Build failed with an exception.
* What went wrong:
org/eclipse/jgit/storage/file/FileRepositoryBuilder has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
Run Code Online (Sandbox Code Playgroud)
我已经在 build.gradle 中更改了 Gradle 插件org.ajoberstar.grgit的版本,并且它正在工作。之前的版本是4.1.0。现在:4.1.1
plugins {
id 'java'
id "org.ajoberstar.grgit" version "4.1.1"
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4212 次 |
| 最近记录: |