首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我尝试运行gradlew genSource

我尝试运行gradlew genSource
EN

Stack Overflow用户
提问于 2021-08-01 17:38:08
回答 1查看 1.8K关注 0票数 0
代码语言:javascript
复制
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

编辑:新错误:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-09-04 12:19:53

(评论回答)

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

然后,对于第二个错误java.nio.file.FileSystemException

停止所有运行gradle守护进程多亏了gradlew --stop命令。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68612906

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档