我尝试 运行 gradlew genSource
I try to run gradlew genSource
C:\Users\boeec\OneDrive\Desktop\MC Modding\krypton>gradlew genSource
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\boeec\OneDrive\Desktop\MC Modding\krypton\build.gradle' line: 2
* What went wrong:
An exception occurred applying plugin request [id: 'fabric-loom', version: '0.8-SNAPSHOT']
> Failed to apply plugin 'fabric-loom'.
> You are using an outdated version of Java (8). Java 16 or higher is required.
The JAVA_HOME environment variable is currently set to (C:\Program Files\AdoptOpenJDK\jdk-8.0.292.10-hotspot\).
* 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 706ms
编辑:新错误:
Starting a Gradle Daemon, 4 incompatible Daemons could not be reused, use --status for details
> Configure project :
Fabric Loom: 0.8.21
> Task :genSources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':genSources'.
> java.nio.file.FileSystemException: C:\Users\boeec\.gradle\caches\fabric-loom.16.4-mapped-net.fabricmc.yarn-1.16.4+build.9-v2\minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.9-v2.jar: Der Prozess kann nicht auf die Datei z
ugreifen, da sie von einem anderen Prozess verwendet wird
* 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 36s
1 actionable task: 1 executed
(来自评论的回答)
对于第一个错误 You are using an outdated version of Java
,您必须将 Java 版本从 1.8 升级到 1.16。
然后,对于第二个错误java.nio.file.FileSystemException
:
Stop all running gradle daemons 感谢 gradlew --stop
命令。
C:\Users\boeec\OneDrive\Desktop\MC Modding\krypton>gradlew genSource
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\boeec\OneDrive\Desktop\MC Modding\krypton\build.gradle' line: 2
* What went wrong:
An exception occurred applying plugin request [id: 'fabric-loom', version: '0.8-SNAPSHOT']
> Failed to apply plugin 'fabric-loom'.
> You are using an outdated version of Java (8). Java 16 or higher is required.
The JAVA_HOME environment variable is currently set to (C:\Program Files\AdoptOpenJDK\jdk-8.0.292.10-hotspot\).
* 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 706ms
编辑:新错误:
Starting a Gradle Daemon, 4 incompatible Daemons could not be reused, use --status for details
> Configure project :
Fabric Loom: 0.8.21
> Task :genSources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':genSources'.
> java.nio.file.FileSystemException: C:\Users\boeec\.gradle\caches\fabric-loom.16.4-mapped-net.fabricmc.yarn-1.16.4+build.9-v2\minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.9-v2.jar: Der Prozess kann nicht auf die Datei z
ugreifen, da sie von einem anderen Prozess verwendet wird
* 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 36s
1 actionable task: 1 executed
(来自评论的回答)
对于第一个错误 You are using an outdated version of Java
,您必须将 Java 版本从 1.8 升级到 1.16。
然后,对于第二个错误java.nio.file.FileSystemException
:
Stop all running gradle daemons 感谢 gradlew --stop
命令。