<tfoot id='3PoeO'></tfoot>

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

      2. <legend id='3PoeO'><style id='3PoeO'><dir id='3PoeO'><q id='3PoeO'></q></dir></style></legend>

        <small id='3PoeO'></small><noframes id='3PoeO'>

          <bdo id='3PoeO'></bdo><ul id='3PoeO'></ul>

        如何在非 GUI 服务器环境中运行 libGDX 应用程序

        时间:2023-07-28

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

          <tbody id='uAtiZ'></tbody>
        <legend id='uAtiZ'><style id='uAtiZ'><dir id='uAtiZ'><q id='uAtiZ'></q></dir></style></legend>

                  <bdo id='uAtiZ'></bdo><ul id='uAtiZ'></ul>
                • <tfoot id='uAtiZ'></tfoot>

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

                  本文介绍了如何在非 GUI 服务器环境中运行 libGDX 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我构建了一个在我的 PC 桌面上运行良好的 libGDX 应用程序,但是当我尝试在我的 Ubuntu 服务器上运行它时,它会引发以下错误:

                  I built a libGDX application that runs well on my PC desktop but when I try to run it on my Ubuntu server, it raises the following error:

                  "LwjglApplication: 无法初始化音频,禁用音频java.lang.UnsatisfiedLinkError:/tmp/libgdxroot/31ce78a2/liblwjgl64.so:/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/../lib/amd64/libjawt.so:符号awt_Unlock,版本 SUNWprivate_1.1 未在文件 libmawt.so 中定义链接时间参考".

                  "LwjglApplication: Couldn't initialize audio, disabling audio java.lang.UnsatisfiedLinkError: /tmp/libgdxroot/31ce78a2/liblwjgl64.so: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/../lib/amd64/libjawt.so: symbol awt_Unlock, version SUNWprivate_1.1 not defined in file libmawt.so with link time reference".

                  我知道这是因为我的服务器在非 GUI 模式下运行.但是我怎样才能在这个环境中运行我的 libGDX 应用程序呢?我听说过libGDX 无头后端".但我不知道如何使用它.提前致谢.

                  I know this is because my server is running in non-GUI mode. But how can I run my libGDX app in this environment?. I've heard about "libGDX headless backend". But I don't know how to use it. Thanks in advance.

                  推荐答案

                  我已经为任何正在寻找这个问题的人回答了这个问题.首先,在 build.gradle 文件中添加这两个库:

                  I've answer my self this question for anyone who's looking for this. First, added these two libraries in the build.gradle file:

                  compile "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
                  compile "org.mockito:mockito-all:1.9.5"
                  

                  然后,我启动了我的 libGDX,如下所示:

                  Then, I've started my libGDX as following:

                  HeadlessNativesLoader.load();
                  MockGraphics mockGraphics = new MockGraphics();
                  Gdx.graphics = mockGraphics;
                  HeadlessNet headlessNet = new HeadlessNet();
                  Gdx.net = headlessNet;
                  HeadlessFiles headlessFiles = new HeadlessFiles();
                  Gdx.files = headlessFiles;
                  Gdx.gl = mock(GL20.class);
                  HeadlessApplicationConfiguration config = new HeadlessApplicationConfiguration();
                  ApplicationListener myGdxGame = EntryPoint.getHeadlessMyGdxGame(config);
                  

                  和 EntryPoint.getHeadlessMyGdxGame 返回 HeadlessApplication 的继承

                  and EntryPoint.getHeadlessMyGdxGame return an inherited of HeadlessApplication

                  这篇关于如何在非 GUI 服务器环境中运行 libGDX 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在 libGDX 框架中匹配用户点击和精灵对象位置 下一篇:在游戏视图下添加 admob

                  相关文章

                  最新文章

                  1. <small id='i4WUe'></small><noframes id='i4WUe'>

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

                      <bdo id='i4WUe'></bdo><ul id='i4WUe'></ul>

                  2. <tfoot id='i4WUe'></tfoot>