【问题标题】:I try to run gradlew genSource我尝试运行 gradlew genSource
【发布时间】:2021-10-07 07:03:48
【问题描述】:
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\1.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

【问题讨论】:

  • “您使用的是过时的 Java (8) 版本。需要 Java 16 或更高版本。”:考虑升级您的 java 安装。
  • 我更新了它,但它不起作用。
  • 我做到了,但现在出现了这个新错误。
  • 看起来某个进程(可能是另一个 Gradle 守护进程)仍然锁定了一些 jar 文件(很奇怪,我不希望该锁定是独占的)。尝试使用stopping all running Gradle daemons 使用gradlew --stop
  • 非常感谢。现在它可以工作了。

标签: java minecraft minecraft-fabric


【解决方案1】:

(来自评论的回答)

对于第一个错误You are using an outdated version of Java,您必须将 Java 版本从 1.8 升级到 1.16。

那么,对于第二个错误java.nio.file.FileSystemException

Stop all running gradle daemons 感谢gradlew --stop 命令。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-01
    • 2020-02-21
    相关资源
    最近更新 更多