libgdx 在 Mac 上抛出异常,无法加载共享库 libgdx-controllers-desktop.dylib

libgdx throws exception on Mac, couldn#39;t load shared library libgdx-controllers-desktop.dylib(libgdx 在 Mac 上抛出异常,无法加载共享库 libgdx-controllers-desktop.dylib)
本文介绍了libgdx 在 Mac 上抛出异常,无法加载共享库 libgdx-controllers-desktop.dylib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我的 libgdx 有问题.它说:

I have a problem with the libgdx. It Says:

Couldn't load shared library 'libgdx-controllers-desktop.dylib' for target: Mac OS X, 32-bit

有人有建议吗?

完全例外:

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: com.badlogic.gdx.utils.GdxRuntimeException: Error creating controller manager: com.badlogic.gdx.controllers.desktop.DesktopControllerManager
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:113)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Error creating controller manager: com.badlogic.gdx.controllers.desktop.DesktopControllerManager
    at com.badlogic.gdx.controllers.Controllers.initialize(Controllers.java:101)
    at com.badlogic.gdx.controllers.Controllers.getControllers(Controllers.java:47)
    at de.datpixelstudio.canopus.states.GameState.init(GameState.java:50)
    at de.datpixelstudio.statebasedgame.StateBasedGame.enterState(StateBasedGame.java:97)
    at de.datpixelstudio.statebasedgame.State.enterState(State.java:54)
    at de.datpixelstudio.statebasedgame.InputHandlerMain.keyDown(InputHandlerMain.java:41)
    at com.badlogic.gdx.InputMultiplexer.keyDown(InputMultiplexer.java:70)
    at com.badlogic.gdx.backends.lwjgl.LwjglInput.processEvents(LwjglInput.java:277)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:187)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:110)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'libgdx-controllers-desktop.dylib' for target: Mac OS X, 32-bit
    at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:104)
    at com.badlogic.gdx.controllers.desktop.DesktopControllerManager.<init>(DesktopControllerManager.java:30)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at com.badlogic.gdx.controllers.Controllers.initialize(Controllers.java:99)
    ... 9 more
Caused by: java.lang.NullPointerException
    at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:102)
    ... 17 more

它的每晚版本 01/12/2013

its the nightly version 01/12/2013

推荐答案

哦,原来是这个问题.我忘了把 gdx-controllers-desktop-natives.jar 放进去.

Oh, that caused the problem. I forgot to take the gdx-controllers-desktop-natives.jar in.

这篇关于libgdx 在 Mac 上抛出异常,无法加载共享库 libgdx-controllers-desktop.dylib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

quot;Char cannot be dereferencedquot; error(“Char 不能被取消引用错误)
Java Switch Statement - Is quot;orquot;/quot;andquot; possible?(Java Switch 语句 - 是“或/“和可能的?)
Java Replace Character At Specific Position Of String?(Java替换字符串特定位置的字符?)
What is the type of a ternary expression with int and char operands?(具有 int 和 char 操作数的三元表达式的类型是什么?)
Read a text file and store every single character occurrence(读取文本文件并存储出现的每个字符)
Why do I need to explicitly cast char primitives on byte and short?(为什么我需要在 byte 和 short 上显式转换 char 原语?)