我试图在这里执行gradlew genSources命令,但它说我使用的是过时的java版本,我至少必须有Java版本17。
PS D:\Coding Stuff\Java Projekte\Minecraft Mods\fabric-example-mod-1.19> ./gradlew genSources
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\Coding Stuff\Java Projekte\Minecraft Mods\fabric-example-mod-1.19\build.gradle' line: 2
* What went wrong:
An exception occurred applying plugin request [id: 'fabric-loom', version: '1.0-SNAPSHOT']
> Failed to apply plugin 'fabric-loom'.
> You are using an outdated version of Java (8). Java 17 or higher is required.
* 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 621ms
我转至文件〉项目结构〉项目,SDK属性明确设置为openjdk-19,语言级别属性设置为SDK默认值(19)。我转至设置〉构建、执行、部署〉构建工具〉Gradle,Gradle JVM属性设置为项目SDK openjdk-19。
使用Windows 10计算机
1条答案
按热度按时间nlejzf6q1#
好吧,你必须使用Java 17,因为Minecraft 1. 19使用的是这个Java版本:)