我正在关注 Kaupenjoe 1.20 Fabric 改装教程中的工作区设置视频。当我运行
./gradlew genSources
时,构建失败并出现以下错误:
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/User/Desktop/Mods/Fabric-Tutorial-1.20.X/build.gradle' line: 2
* What went wrong:
Error resolving plugin [id: 'fabric-loom', version: '1.4-SNAPSHOT']
> Could not resolve all dependencies for configuration 'detachedConfiguration1'.
> Cannot invoke "org.gradle.cache.FileLock.writeFile(java.lang.Runnable)" because the return value of "org.gradle.cache.internal.DefaultCacheCoordinator.access$300(org.gradle.cache.internal.DefaultCacheCoordinator)" is null
* 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 519ms
我尝试过更改 Fabric Loom 的版本(尽管我可能做错了),并且我重新观看了整个视频,以确保到目前为止我正确设置了工作区。我感谢任何帮助!
事实证明我的 gradle.properties 中的 Fabric 加载器版本与 Fabric.mod.json 中的版本不匹配。