FML Gradle-失败:生成失败,并带有异常

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

最近,我一直在Eclipse上设置Minecraft Forge工作区。我过去使用伪造(MC1.6.4等)创建了我的世界mod,尽管此后发生了很多变化。我正在尝试使用Forge1.15.2-31.1.0 mdk AND JDK 1.8.0_241

我在工作区文件夹中创建了一个RunClient.bat文件,用于编译和构建我的项目

它完全构建并编译为98%,然后崩溃。这是我的当机报告:

    ---- Minecraft Crash Report ----
// I bet Cylons wouldn’t have this problem.

Time: 13/04/20 2:16 PM
Description: Initializing game

java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
at net.minecraft.client.MainWindow.loadIcon(MainWindow.java:188) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.client.MainWindow.setWindowIcon(MainWindow.java:152) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.client.Minecraft.(Minecraft.java:380) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
at net.minecraft.client.main.Main.main(Main.java:141) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241] {}
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_241] {}
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_241] {}
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_241] {}
at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] {}
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] {}
at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] {}
at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] {}
at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {}
A detailed walkthrough of the error, its code path and all known details is as follows:

– Head –
Thread: Render thread
Stacktrace:
at net.minecraft.client.MainWindow.loadIcon(MainWindow.java:188)
at net.minecraft.client.MainWindow.setWindowIcon(MainWindow.java:152)
at net.minecraft.client.Minecraft.(Minecraft.java:380)

– Initialization –
Details:
Stacktrace:
at net.minecraft.client.main.Main.main(Main.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)

– System Details –
Details:
Minecraft Version: 1.15.2
Minecraft Version ID: 1.15.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_241, Oracle Corporation
Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 928980168 bytes (885 MB) / 1747976192 bytes (1667 MB) up to 3817865216 bytes (3641 MB)
CPUs: 4
JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx4096m
Launched Version: MOD_DEV
Backend library: LWJGL version 3.2.2 build 10
Backend API: GeForce GTX 1060 6GB/PCIe/SSE2 GL version 4.6.0 NVIDIA 445.75, NVIDIA Corporation
GL Caps:
Using VBOs: Yes
Is Modded: Definitely; Client brand changed to ‘forge’
Type: Client (map_client.txt)
CPU:

-更新2020-04-16-- JDK 13崩溃报告:

---- Minecraft Crash Report ----
// Why did you do that?

Time: 2020-04-12, 9:11 p.m.
Description: Initializing game

java.lang.ExceptionInInitializerError: null
    at net.minecraftforge.fml.ModLoader.<init>(ModLoader.java:121) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading}
    at net.minecraftforge.fml.ModLoader.get(ModLoader.java:146) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading}
    at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:97) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:393) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:141) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] {}
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
    at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {}
Caused by: java.lang.IllegalStateException: Failed to resolve consumer event type: net.minecraftforge.fml.network.simple.SimpleChannel$$Lambda$2199/0x000000080140ec40@2c4e63b3
    at net.minecraftforge.eventbus.EventBus.addListener(EventBus.java:194) ~[eventbus-2.0.0-milestone.1-service.jar:?] {}
    at net.minecraftforge.eventbus.EventBus.addListener(EventBus.java:161) ~[eventbus-2.0.0-milestone.1-service.jar:?] {}
    at net.minecraftforge.eventbus.EventBus.addListener(EventBus.java:156) ~[eventbus-2.0.0-milestone.1-service.jar:?] {}
    at net.minecraftforge.eventbus.EventBus.addListener(EventBus.java:151) ~[eventbus-2.0.0-milestone.1-service.jar:?] {}
    at net.minecraftforge.fml.network.NetworkInstance.addListener(NetworkInstance.java:65) ~[?:?] {re:classloading}
    at net.minecraftforge.fml.network.simple.SimpleChannel.<init>(SimpleChannel.java:56) ~[?:?] {re:classloading}
    at net.minecraftforge.fml.network.simple.SimpleChannel.<init>(SimpleChannel.java:49) ~[?:?] {re:classloading}
    at net.minecraftforge.fml.network.NetworkRegistry$ChannelBuilder.simpleChannel(NetworkRegistry.java:409) ~[?:?] {re:classloading}
    at net.minecraftforge.fml.network.NetworkInitialization.getHandshakeChannel(NetworkInitialization.java:38) ~[?:?] {re:classloading}
    at net.minecraftforge.fml.network.FMLNetworkConstants.<clinit>(FMLNetworkConstants.java:48) ~[?:?] {re:classloading}
    ... 18 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
    at net.minecraftforge.fml.ModLoader.<init>(ModLoader.java:121)
    at net.minecraftforge.fml.ModLoader.get(ModLoader.java:146)
    at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$2(ClientModLoader.java:97)
    at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$5(ClientModLoader.java:113)
    at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:97)
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:393)

-- Initialization --
Details:
Stacktrace:
    at net.minecraft.client.main.Main.main(Main.java:141)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)

-- System Details --
Details:
    Minecraft Version: 1.15.2
    Minecraft Version ID: 1.15.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 13.0.2, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
    Memory: 1419176960 bytes (1353 MB) / 2276458496 bytes (2171 MB) up to 6392119296 bytes (6096 MB)
    CPUs: 4
    JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx6096m
    Launched Version: MOD_DEV
    Backend library: LWJGL version 3.2.2 build 10
    Backend API: GeForce GTX 1060 6GB/PCIe/SSE2 GL version 4.6.0 NVIDIA 445.75, NVIDIA Corporation
    GL Caps: Using framebuffer using OpenGL 3.0
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'forge'
    Type: Client (map_client.txt)
    CPU: 4x Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz

-更新2020-04-17--重建工作区(针对Java 8编译并运行):

---- Minecraft Crash Report ----
// Daisy, daisy...

Time: 17/04/20 6:50 PM
Description: Initializing game

java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
    at net.minecraft.client.MainWindow.loadIcon(MainWindow.java:188) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.MainWindow.setWindowIcon(MainWindow.java:152) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:380) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:141) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_241] {}
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_241] {}
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_241] {}
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] {}
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.0_mapped_snapshot_20190719-1.14.3-recomp.jar:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
    at net.minecraft.client.MainWindow.loadIcon(MainWindow.java:188)
    at net.minecraft.client.MainWindow.setWindowIcon(MainWindow.java:152)
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:380)

-- Initialization --
Details:
Stacktrace:
    at net.minecraft.client.main.Main.main(Main.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
    at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)

-- System Details --
Details:
    Minecraft Version: 1.15.2
    Minecraft Version ID: 1.15.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_241, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 620772560 bytes (592 MB) / 1550319616 bytes (1478 MB) up to 3817865216 bytes (3641 MB)
    CPUs: 4
    JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx4096m
    Launched Version: MOD_DEV
    Backend library: LWJGL version 3.2.2 build 10
    Backend API: GeForce GTX 1060 6GB/PCIe/SSE2 GL version 4.6.0 NVIDIA 445.75, NVIDIA Corporation
    GL Caps: 
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'forge'
    Type: Client (map_client.txt)
    CPU: <unknown>
java gradle minecraft-forge
1个回答
1
投票

[在Java 8中,ByteBuffer.rewind()返回Buffer,但是在Java 13中,它返回ByteBuffer。您的第一个崩溃报告表明您针对Java 13进行了编译,但是针对Java 8运行了,这是行不通的。您的第二个崩溃报告是因为Forge仍然不支持在Java 13上运行。要解决您的问题,请清除所有构建高速缓存,然后使用Java 8编译器重新编译。完成此操作后,就可以在Java 8上运行。

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