2

I'm new. And i have learnt about Libgdx. My project runs normally before. But today, i got two errors.

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)

i didn't know why. please tell me how to fixed Tks all.

Neo Tran
  • 21
  • 4
  • Your actual code would come in handy as well and especially `line:229` of `MainScreen.` – Madmenyo Sep 12 '15 at 10:10
  • Anyway, you did not initialize the object you are using. Its want to do something with an object but it is empty. – Madmenyo Sep 12 '15 at 10:11

0 Answers0