libgdx:错误java.lang.NullPointerException

时间:2015-09-12 02:18:51

标签: java android libgdx

我是新人。我已经了解了Libgdx。我的项目之前正常运行。但今天,我有两个错误。

java.lang.NullPointerException: Attempt to invoke interface method 'void java.lang.Runnable.run()' on a null object reference
 at com.badlogic.gdx.scenes.scene2d.actions.RunnableAction.run(RunnableAction.java:42)
 at com.badlogic.gdx.scenes.scene2d.actions.RunnableAction.act(RunnableAction.java:32)
 at com.badlogic.gdx.scenes.scene2d.actions.SequenceAction.act(SequenceAction.java:65)
 at com.badlogic.gdx.scenes.scene2d.Actor.act(Actor.java:95)
 at com.badlogic.gdx.scenes.scene2d.Group.act(Group.java:46)
 at com.badlogic.gdx.scenes.scene2d.Group.act(Group.java:49)
 at com.badlogic.gdx.scenes.scene2d.Group.act(Group.java:49)
 at com.sgroup.jqkpro.base.ABSUser.act(ABSUser.java:1116)
 at com.badlogic.gdx.scenes.scene2d.Group.act(Group.java:49)
 at com.badlogic.gdx.scenes.scene2d.Stage.act(Stage.java:223)
 at com.sgroup.jqkpro.screens.MainScreen.update(MainScreen.java:228)
 at com.sgroup.jqkpro.screens.DefaultScreen.render(DefaultScreen.java:55)
 at com.badlogic.gdx.Game.render(Game.java:46)
 at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:422)
 at android.opengl.GLSurfaceViewGLThread.guardedRun(GLSurfaceView.java:1522)
 at android.opengl.GLSurfaceViewGLThread.run(GLSurfaceView.java:1239)


 java.lang.NullPointerException: Attempt to invoke virtual method 'float com.badlogic.gdx.scenes.scene2d.Actor.getX(int)' on a null object reference
 at com.badlogic.gdx.scenes.scene2d.actions.MoveToAction.begin(MoveToAction.java:29)
 at com.badlogic.gdx.scenes.scene2d.actions.TemporalAction.act(TemporalAction.java:48)
 at com.badlogic.gdx.scenes.scene2d.actions.SequenceAction.act(SequenceAction.java:65)
 at com.badlogic.gdx.scenes.scene2d.Actor.act(Actor.java:95)
 at com.badlogic.gdx.scenes.scene2d.Group.act(Group.java:46)
 at com.badlogic.gdx.scenes.scene2d.Group.act(Group.java:49)
 at com.badlogic.gdx.scenes.scene2d.Group.act(Group.java:49)
 at com.badlogic.gdx.scenes.scene2d.Stage.act(Stage.java:223)
 at com.sgroup.jqkpro.screens.MainScreen.update(MainScreen.java:229)
 at com.sgroup.jqkpro.screens.DefaultScreen.render(DefaultScreen.java:55)
 at com.badlogic.gdx.Game.render(Game.java:46)
 at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:422)
 at android.opengl.GLSurfaceViewGLThread.guardedRun(GLSurfaceView.java:1522)
 at android.opengl.GLSurfaceViewGLThread.run(GLSurfaceView.java:1239)

我不知道为什么。请告诉我如何修复 Tks all。

0 个答案:

没有答案