我正在与LibGDX在桌面上的问题。我不断收到试图启动应用程序时出现以下错误:UnsatisfiedLinkError Libgdx桌面
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.badlogic.gdx.utils.BufferUtils.newDisposableByteBuffer(I)Ljava/nio/ByteBuffer;
at com.badlogic.gdx.utils.BufferUtils.newDisposableByteBuffer(Native Method)
at com.badlogic.gdx.utils.BufferUtils.newUnsafeByteBuffer(BufferUtils.java:288)
at com.badlogic.gdx.graphics.glutils.VertexArray.<init>(VertexArray.java:62)
at com.badlogic.gdx.graphics.glutils.VertexArray.<init>(VertexArray.java:53)
at com.badlogic.gdx.graphics.Mesh.<init>(Mesh.java:148)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.<init>(SpriteBatch.java:173)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.<init>(SpriteBatch.java:142)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.<init>(SpriteBatch.java:121)
at com.badlogic.gdx.graphics.g2d.SpriteBatch.<init>(SpriteBatch.java:115)
我有以下库添加到我的项目:
- gdx.jar
- GDX-sources.jar
- GDX-natives.jar
- GDX-后端-lwjgl.jar
- GDX-后端-LWJGL-natives.jar
我错过了什么吗?
我已经搜索了高低,但我发现的一切都是为了Android,并告诉我将arm文件夹中的.so库添加到我的项目中,但对于我在wintel上的桌面项目没有任何意义平台。
它不必位于*类路径*它必须位于*库路径*中,这意味着您必须通过将其值设置为目录的路径来定义java.library.path系统属性这样的文件驻留。无论是从命令行或编程,但那么它必须是在这之前的代码试图执行或[UnsatisfiedLinkError抛出](http://docs.oracle.com/javase/7/docs/api/java/lang/UnsatisfiedLinkError.html )。根据[libgdx是](https://code.google.com/p/libgdx/)来判断我建议你从@ noone的回答中尝试解决方案。 – linski