./gradlew genSources 在设置结构环境时失败

问题描述 投票:0回答:1

命令:

C:\Users\user\Downloads\template-mod-template-1.19.3> .\gradlew genSources --info

日志:

Initialized native services in: C:\Users\user\.gradle\native
Initialized jansi services in: C:\Users\user\.gradle\native
Received JVM installation metadata from 'C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot': {JAVA_HOME=C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot, JAVA_VERS
ION=17.0.6, JAVA_VENDOR=Eclipse Adoptium, RUNTIME_NAME=OpenJDK Runtime Environment, RUNTIME_VERSION=17.0.6+10, VM_NAME=OpenJDK 64-Bit Server VM, VM_VERSION=17.0.6+10, VM_VENDOR
=Eclipse Adoptium, OS_ARCH=amd64}
The client will now receive all logging from the daemon (pid: 11684). The daemon log file: C:\Users\user\.gradle\daemon\7.6\daemon-11684.out.log
Starting 6th build in daemon [uptime: 16 mins 22.016 secs, performance: 98%, GC rate: 0.01/s, heap usage: 6% of 1 GiB]
Using 4 worker leases.                                                                                                
Now considering [C:\Users\user\Downloads\template-mod-template-1.19.3] as hierarchies to watch                        
Watching the file system is configured to be enabled if available
File system watching is active
Starting Build
Settings evaluated using settings file 'C:\Users\user\Downloads\template-mod-template-1.19.3\settings.gradle'.
Projects loaded. Root project using build file 'C:\Users\user\Downloads\template-mod-template-1.19.3\build.gradle'.
Included projects: [root project 'template-mod-template-1.19.3']

> Configure project :
Evaluating root project 'template-mod-template-1.19.3' using build file 'C:\Users\user\Downloads\template-mod-template-1.19.3\build.gradle'.
Fabric Loom: 1.1.12
(kotlinx.metadata.jvm.KotlinClassMetadata) with version (0.5.0) was loaded from (/C:/Users/user/.gradle/caches/jars-9/3d72942eb5e4258ac0ccff67cb261d54/kotlinx-metadata-jvm-0.5.
0.jar)
(org.objectweb.asm.ClassVisitor) with version (9.4) was loaded from (/C:/Users/user/.gradle/caches/jars-9/7aa412e7437c85d3a44974d9a0c03a66/asm-9.4.jar)
(org.objectweb.asm.tree.analysis.Analyzer) with version (9.4) was loaded from (/C:/Users/user/.gradle/caches/jars-9/38635d8db7a37e0b51b8cfee8a405c52/asm-analysis-9.4.jar)      
(org.objectweb.asm.commons.ClassRemapper) with version (9.4) was loaded from (/C:/Users/user/.gradle/caches/jars-9/1f1d14d9d70995a7c16e6a8351e63723/asm-commons-9.4.jar)        
(org.objectweb.asm.tree.ClassNode) with version (9.4) was loaded from (/C:/Users/user/.gradle/caches/jars-9/fe3ea2001351c1699cc0b2b46e4dc874/asm-tree-9.4.jar)
(org.objectweb.asm.util.ASMifier) with version (9.4) was loaded from (/C:/Users/user/.gradle/caches/jars-9/a2459843a6a9b6c2dda5b0fd0bd8e4ba/asm-util-9.4.jar)
(com.fasterxml.jackson.databind.ObjectMapper) with version (2.14.1) was loaded from (/C:/Users/user/.gradle/caches/jars-9/6d9d643e44326546452509c7086d1650/jackson-databind-2.14
.1.jar)
(com.google.gson.Gson) with version (null) was loaded from (/C:/Users/user/.gradle/caches/jars-9/6f7cc274ff93388d5bf1ea9b0a5e5c32/gson-2.10.1.jar)
(com.google.common.base.Preconditions) with version (null) was loaded from (/C:/Users/user/.gradle/caches/jars-9/c1011467fb85a4ac798e2e11cc5ef0e6/guava-31.1-jre.jar)
(org.apache.commons.io.FileUtils) with version (2.11.0) was loaded from (/C:/Users/user/.gradle/caches/jars-9/d5bb6135c7412c8f0c8df61b8284122d/commons-io-2.11.0.jar)
Creating new SharedServiceManager(1790319328)
Creating new SharedServiceManager(1780358931)
Found existing cache lock file, rebuilding loom cache. This may have been caused by a failed or canceled build.
:merging jars
:Extracting server jar from bootstrap
:extracting yarn-1.19.3+build.5-v2.jar
Downloading intermediary from https://maven.fabricmc.net/net/fabricmc/intermediary/1.19.3/intermediary-1.19.3-v2.jar
:merging mappings
:merged mappings in 273.8 ms
Closing SharedServiceManager(1780358931)

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'template-mod-template-1.19.3'.
> Failed to setup Minecraft, java.nio.file.ClosedFileSystemException: null 

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --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 30s
Watched directory hierarchies: []

我试过 ./gradlew genSources 并且它应该自动设置 fabric modding 的源,但它返回我失败的消息。

我也试过 .\gradlew genSources 但结果相同,还有 ./gradlew genSources --info 所以我得到了日志。

java minecraft gradlew minecraft-fabric
1个回答
0
投票

here所述,您似乎有正在使用该文件的后台进程。

ClosedFileSystemException
错误表示文件已被锁定。通过使用这个命令:

gradle --stop

您将能够修复它。现在您可以运行所有其他命令。

© www.soinside.com 2019 - 2024. All rights reserved.