gpt4 book ai didi

Gradle 构建失败并显示 "org/eclipse/jgit/storage/file/FileRepositoryBuilder has been compiled by a more recent version of the Java"

转载 作者:行者123 更新时间:2023-12-05 09:29:56 27 4
gpt4 key购买 nike

从今天开始,我不能再构建我的项目了。它没有任何变化。看起来一些 Gradle 依赖项是用 Java 11 重新编译的。我正在使用 Java 8 和 Gradle 4.10。

org/eclipse/jgit/storage/file/FileRepositoryBuilder 已由较新版本的 Java Runtime(类文件版本 55.0)编译,此版本的 Java Runtime 只能识别 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
    echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64/
./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

最佳答案

我已经在 build.gradle 中更改了 Gradle 插件 org.ajoberstar.grgit 的版本,它正在运行。之前的版本是4.1.0。现在:4.1.1

plugins {
id 'java'
id "org.ajoberstar.grgit" version "4.1.1"
}

关于Gradle 构建失败并显示 "org/eclipse/jgit/storage/file/FileRepositoryBuilder has been compiled by a more recent version of the Java",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70201884/

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