gpt4 book ai didi

java - LibGdx 项目设置 - 生成的项目存在 gradle 错误

转载 作者:行者123 更新时间:2023-12-02 10:46:35 29 4
gpt4 key购买 nike

我正在尝试使用工具 gdx-setup.jar 生成基于 LibGdx 的项目

我遇到了一些以前从未遇到过的奇怪错误。您能帮我成功生成项目吗?

Generating app in C:\Games\Jewel Games New Executing 'C:\Games\Jewel Games New/gradlew.bat clean --no-daemon' To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.6/userguide/gradle_daemon.html. Daemon will be stopped at the end of the build stopping after processing

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Games\Jewel Games New\build.gradle' line: 57

* What went wrong:
A problem occurred evaluating root project 'Jewel Games New'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 16s
Done!
To import in Eclipse: File -> Import -> Gradle -> Gradle Project
To import to Intellij IDEA: File -> Open -> build.gradle
To import to NetBeans: File -> Open Project...

最佳答案

java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0

major.minor version 52.0 错误可能是因为该 jar 是在 JDK 1.8 中编译的,但您尝试使用 JDK 1.7 环境运行它。

为了解决这个问题,最好让 JDK 和 JRE 指向同一版本。

关于java - LibGdx 项目设置 - 生成的项目存在 gradle 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52509393/

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