<legend id='6KtrJ'><style id='6KtrJ'><dir id='6KtrJ'><q id='6KtrJ'></q></dir></style></legend><tfoot id='6KtrJ'></tfoot>

  • <i id='6KtrJ'><tr id='6KtrJ'><dt id='6KtrJ'><q id='6KtrJ'><span id='6KtrJ'><b id='6KtrJ'><form id='6KtrJ'><ins id='6KtrJ'></ins><ul id='6KtrJ'></ul><sub id='6KtrJ'></sub></form><legend id='6KtrJ'></legend><bdo id='6KtrJ'><pre id='6KtrJ'><center id='6KtrJ'></center></pre></bdo></b><th id='6KtrJ'></th></span></q></dt></tr></i><div id='6KtrJ'><tfoot id='6KtrJ'></tfoot><dl id='6KtrJ'><fieldset id='6KtrJ'></fieldset></dl></div>

      <small id='6KtrJ'></small><noframes id='6KtrJ'>

        • <bdo id='6KtrJ'></bdo><ul id='6KtrJ'></ul>

        UnsatisfiedLinkError Libgdx 桌面

        时间:2023-05-20

        1. <i id='gUPFd'><tr id='gUPFd'><dt id='gUPFd'><q id='gUPFd'><span id='gUPFd'><b id='gUPFd'><form id='gUPFd'><ins id='gUPFd'></ins><ul id='gUPFd'></ul><sub id='gUPFd'></sub></form><legend id='gUPFd'></legend><bdo id='gUPFd'><pre id='gUPFd'><center id='gUPFd'></center></pre></bdo></b><th id='gUPFd'></th></span></q></dt></tr></i><div id='gUPFd'><tfoot id='gUPFd'></tfoot><dl id='gUPFd'><fieldset id='gUPFd'></fieldset></dl></div>
            <tbody id='gUPFd'></tbody>
                <tfoot id='gUPFd'></tfoot>

                <small id='gUPFd'></small><noframes id='gUPFd'>

                  <bdo id='gUPFd'></bdo><ul id='gUPFd'></ul>
                • <legend id='gUPFd'><style id='gUPFd'><dir id='gUPFd'><q id='gUPFd'></q></dir></style></legend>

                  本文介绍了UnsatisfiedLinkError Libgdx 桌面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我在桌面上遇到了 LibGDX 的问题.尝试启动应用程序时,我不断收到以下错误:

                  I am running into issues with LibGDX on Desktop. I keep getting the following error when trying to launch the application:

                  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)
                  

                  我的项目中添加了以下库:

                  I have the following libraries added to my project:

                  • gdx.jar
                  • gdx-sources.jar
                  • gdx-natives.jar
                  • gdx-backend-lwjgl.jar
                  • gdx-backend-lwjgl-natives.jar

                  我错过了什么吗?

                  我搜索了高低,但我找到的所有内容都是针对 Android 的,并告诉我将 arm 文件夹中的 .so 库添加到我的项目中,但这对我来说对于 wintel 平台上的桌面项目没有意义.

                  I have searched high and low, but everything I find is for Android and tells me to add the .so libs from the arm folders to my project, but that doesn't make sense to me for a desktop project on wintel platform.

                  推荐答案

                  我建议你使用 这个 GUI.它应该为您提供适用于所有平台的有效设置.您也可以使用最新的夜间版本并检查问题是否仍然存在.问题可能是本机库与其他 jar 不匹配.

                  I'd advise you to setup your projects with this GUI. It should provide you with a valid setup for all platforms. You may also use the latest nightly builds and check if the problem still occurs. The problem might be that the native libraries do not match the other jars.

                  另一个问题可能是您过早地实例化 SpriteBatch(或其他内部使用 SpriteBatch 的东西)(在堆栈跟踪中看起来有点像这样).例如像这样静态地:

                  Another problem might be that you instantiate a SpriteBatch (or something else which internally uses a SpriteBatch) too early (looked a bit like this in the stacktrace). For example statically like this:

                  private static SpriteBatch batch = new SpriteBatch();
                  

                  这不起作用,因为此时未正确设置 libgdx.相反,请在游戏的 create/show 方法中创建此类内容.

                  This won't work, since libgdx wasn't setup correctly at this point in time. Instead, create such things in the create/show methods of your game.

                  这篇关于UnsatisfiedLinkError Libgdx 桌面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:LibGDX:过滤缩放的 TextureRegion 下一篇:导入gradle项目,android报错

                  相关文章

                  最新文章

                  <small id='qRD9J'></small><noframes id='qRD9J'>

                  <tfoot id='qRD9J'></tfoot>

                  • <bdo id='qRD9J'></bdo><ul id='qRD9J'></ul>
                    <legend id='qRD9J'><style id='qRD9J'><dir id='qRD9J'><q id='qRD9J'></q></dir></style></legend>
                  1. <i id='qRD9J'><tr id='qRD9J'><dt id='qRD9J'><q id='qRD9J'><span id='qRD9J'><b id='qRD9J'><form id='qRD9J'><ins id='qRD9J'></ins><ul id='qRD9J'></ul><sub id='qRD9J'></sub></form><legend id='qRD9J'></legend><bdo id='qRD9J'><pre id='qRD9J'><center id='qRD9J'></center></pre></bdo></b><th id='qRD9J'></th></span></q></dt></tr></i><div id='qRD9J'><tfoot id='qRD9J'></tfoot><dl id='qRD9J'><fieldset id='qRD9J'></fieldset></dl></div>