运行桌面项目时,新的libGDX项目无法加载库liblwjgl.dylib.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/4l/nsj9j4xj51g8h_6y_ndpnmc80000gn/T/libgdxChristian/3741154320/liblwjgl.dylib at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1798) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1080) at org.lwjgl.Sys$1.run(Sys.java:70) at java.security.AccessController.doPrivileged(Native Method) at org.lwjgl.Sys.doLoadLibrary(Sys.java:66) at org.lwjgl.Sys.loadLibrary(Sys.java:95) at org.lwjgl.Sys.(Sys.java:112) at org.lwjgl.openal.AL. (AL.java:59) at com.badlogic.gdx.backends.openal.OpenALAudio. (OpenALAudio.java:70) at com.badlogic.gdx.backends.lwjgl.LwjglApplication. (LwjglApplication.java:80) at com.badlogic.gdx.backends.lwjgl.LwjglApplication. (LwjglApplication.java:64) at com.foxhat.test.Main.main(Main.java:14)
更新:
我Java 1.8
在OSX 10.9上运行.同样的错误不仅出现在自己的项目中,还出现在使用libGDX构建的外部JAR中.
错误中提到的文件夹,在哪里liblwjgl.dylib
搜索,包含:
liblwjgl.jnilib openal.dylib
重命名liblwjgl.jnilib
到.dylib
不工作的外国申请,而不是我自己.