<legend id='QHNO5'><style id='QHNO5'><dir id='QHNO5'><q id='QHNO5'></q></dir></style></legend>

    1. <tfoot id='QHNO5'></tfoot>

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

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

      2. java.lang.NoClassDefFoundError (libgdx)

        时间:2023-05-19
            • <bdo id='xwETQ'></bdo><ul id='xwETQ'></ul>
              <i id='xwETQ'><tr id='xwETQ'><dt id='xwETQ'><q id='xwETQ'><span id='xwETQ'><b id='xwETQ'><form id='xwETQ'><ins id='xwETQ'></ins><ul id='xwETQ'></ul><sub id='xwETQ'></sub></form><legend id='xwETQ'></legend><bdo id='xwETQ'><pre id='xwETQ'><center id='xwETQ'></center></pre></bdo></b><th id='xwETQ'></th></span></q></dt></tr></i><div id='xwETQ'><tfoot id='xwETQ'></tfoot><dl id='xwETQ'><fieldset id='xwETQ'></fieldset></dl></div>
                <tbody id='xwETQ'></tbody>

              <legend id='xwETQ'><style id='xwETQ'><dir id='xwETQ'><q id='xwETQ'></q></dir></style></legend>
              • <small id='xwETQ'></small><noframes id='xwETQ'>

                <tfoot id='xwETQ'></tfoot>

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

                  问题描述

                  限时送ChatGPT账号..

                  一直在尝试使用 Libgdx 框架,但遇到了一些令人沮丧的问题.我正在学习教程,但无法运行我的项目.我做错了什么?

                  Been trying to work with the Libgdx framework and have been experiencing some frustrating issues.. I'm following a tutorial and I'm unable to run my project. What am I doing wrong?

                  package com.mygdx.game.android;
                  
                  import com.badlogic.gdx.ApplicationListener;
                  import com.badlogic.gdx.Gdx;
                  import com.badlogic.gdx.graphics.Texture;
                  import com.badlogic.gdx.graphics.g2d.SpriteBatch;
                  
                  public class AndroidLauncher implements ApplicationListener {
                  
                      SpriteBatch batch;
                      Texture mario;
                  
                  
                      @Override
                      public void create() {
                          batch = new SpriteBatch();
                  
                          mario = new Texture(Gdx.files.internal("mario.png"));
                      }
                  
                      @Override
                      public void resize(int width, int height) {
                          // TODO Auto-generated method stub
                  
                      }
                  
                      @Override
                      public void render() {
                          Gdx.gl.glClearColor(1,1,1,1);
                  
                  
                          batch.begin();
                          batch.draw(mario, 50, 50);
                          batch.end();
                  
                  
                  
                      }
                  
                      @Override
                      public void pause() {
                          // TODO Auto-generated method stub
                  
                      }
                  
                      @Override
                      public void resume() {
                          // TODO Auto-generated method stub
                  
                      }
                  
                      @Override
                      public void dispose() {
                          // TODO Auto-generated method stub
                  
                      }
                  
                  }
                  

                  这是我运行项目时控制台显示的内容:

                  Here's what the console displays when I run the project:

                  Exception in thread "main" java.lang.NoClassDefFoundError: com/badlogic/gdx/jnigen/NativeCodeGenerator
                      at com.badlogic.gdx.utils.GdxBuild.main(GdxBuild.java:34)
                  Caused by: java.lang.ClassNotFoundException: com.badlogic.gdx.jnigen.NativeCodeGenerator
                      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
                      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
                      at java.security.AccessController.doPrivileged(Native Method)
                      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
                      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
                      ... 1 more
                  

                  推荐答案

                  我遇到了同样的问题,但意识到我正在运行 GdxBuild.确保您右键单击 DesktopLauncher.java > Run As > Java Application.

                  I had the same problem, but realised that I was running GdxBuild instead. Ensure that you right click on DesktopLauncher.java > Run As > Java Application.

                  这篇关于java.lang.NoClassDefFoundError (libgdx)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:无法将 gdx-tools 添加到 libgdx gradle 项目 下一篇:Java - LibGDX - isKeyPressed 和 isKeyJustPressed 有什么区别

                  相关文章

                  最新文章

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

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