Mac 上的 LWJGL 未 运行
LWJGL not running on Mac
我参与了一个项目,我们正在制作游戏。对于我们的图形,我们使用 LWJGL。该程序 运行 对小组中的其他人都没有任何问题,除了我。我认为它与 Mac 设置有关。
我下载了 LibJDX 并创建了我自己的项目,但这也没有 运行。这些是我得到的错误。
[LwjglApplication] Couldn't initialize audio, disabling audio
java.lang.UnsatisfiedLinkError: /private/var/folders/q0/gh911rrs3pg1k241bzwk60jw0000gn/T/libgdxmichellefilipaa/f7649394/liblwjgl.dylib: dlopen(/private/var/folders/q0/gh911rrs3pg1k241bzwk60jw0000gn/T/libgdxmichellefilipaa/f7649394/liblwjgl.dylib, 1): no suitable image found. Did find:
/private/var/folders/q0/gh911rrs3pg1k241bzwk60jw0000gn/T/libgdxmichellefilipaa/f7649394/liblwjgl.dylib: no matching architecture in universal wrapper
/private/var/folders/q0/gh911rrs3pg1k241bzwk60jw0000gn/T/libgdxmichellefilipaa/f7649394/liblwjgl.dylib: no matching architecture in universal wrapper
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2383)
at java.base/java.lang.Runtime.load0(Runtime.java:746)
at java.base/java.lang.System.load(System.java:1857)
at org.lwjgl.Sys.run(Sys.java:70)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:96)
at org.lwjgl.Sys.<clinit>(Sys.java:117)
at org.lwjgl.openal.AL.<clinit>(AL.java:59)
at com.badlogic.gdx.backends.lwjgl.audio.OpenALLwjglAudio.<init>(OpenALLwjglAudio.java:72)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.createAudio(LwjglApplication.java:282)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:90)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:71)
at com.university.maastricht.desktop.DesktopLauncher.main(DesktopLauncher.java:13)
BUILD SUCCESSFUL in 258ms
5 actionable tasks: 1 executed, 4 up-to-date
Exception in thread "LWJGL Application" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.Sys
at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setVSync(LwjglGraphics.java:643)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.run(LwjglApplication.java:125)
19:43:27: Task execution finished ':desktop:DesktopLauncher.main()'.
这就是我的配置。任何建议都会很棒。谢谢
我有 MacBook Air 2020,Apple M1 芯片,macOS Big Sur 11.3.1。
M1 表示手臂 cpu 拱形。 LibGDX 尚不支持 Mac 上的 arm,因为还没有支持该功能的 LWJGL 3 版本。参见 github。com/libgdx/libgdx/issues/6084
我参与了一个项目,我们正在制作游戏。对于我们的图形,我们使用 LWJGL。该程序 运行 对小组中的其他人都没有任何问题,除了我。我认为它与 Mac 设置有关。
我下载了 LibJDX 并创建了我自己的项目,但这也没有 运行。这些是我得到的错误。
[LwjglApplication] Couldn't initialize audio, disabling audio
java.lang.UnsatisfiedLinkError: /private/var/folders/q0/gh911rrs3pg1k241bzwk60jw0000gn/T/libgdxmichellefilipaa/f7649394/liblwjgl.dylib: dlopen(/private/var/folders/q0/gh911rrs3pg1k241bzwk60jw0000gn/T/libgdxmichellefilipaa/f7649394/liblwjgl.dylib, 1): no suitable image found. Did find:
/private/var/folders/q0/gh911rrs3pg1k241bzwk60jw0000gn/T/libgdxmichellefilipaa/f7649394/liblwjgl.dylib: no matching architecture in universal wrapper
/private/var/folders/q0/gh911rrs3pg1k241bzwk60jw0000gn/T/libgdxmichellefilipaa/f7649394/liblwjgl.dylib: no matching architecture in universal wrapper
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2383)
at java.base/java.lang.Runtime.load0(Runtime.java:746)
at java.base/java.lang.System.load(System.java:1857)
at org.lwjgl.Sys.run(Sys.java:70)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:96)
at org.lwjgl.Sys.<clinit>(Sys.java:117)
at org.lwjgl.openal.AL.<clinit>(AL.java:59)
at com.badlogic.gdx.backends.lwjgl.audio.OpenALLwjglAudio.<init>(OpenALLwjglAudio.java:72)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.createAudio(LwjglApplication.java:282)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:90)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.<init>(LwjglApplication.java:71)
at com.university.maastricht.desktop.DesktopLauncher.main(DesktopLauncher.java:13)
BUILD SUCCESSFUL in 258ms
5 actionable tasks: 1 executed, 4 up-to-date
Exception in thread "LWJGL Application" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.Sys
at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setVSync(LwjglGraphics.java:643)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.run(LwjglApplication.java:125)
19:43:27: Task execution finished ':desktop:DesktopLauncher.main()'.
这就是我的配置。任何建议都会很棒。谢谢
我有 MacBook Air 2020,Apple M1 芯片,macOS Big Sur 11.3.1。
M1 表示手臂 cpu 拱形。 LibGDX 尚不支持 Mac 上的 arm,因为还没有支持该功能的 LWJGL 3 版本。参见 github。com/libgdx/libgdx/issues/6084