Note that there are some explanatory texts on larger screens.

plurals
  1. POonResumeGame() NullPointerException when using AndEngine
    text
    copied!<p>I have an issue with my app when starting an <code>SimpleBaseGameActivity</code> from another <code>SimpleBaseGameActivity</code>. The code is:</p> <pre><code>Intent intent = new Intent(MainMenuActivity.this, PacManActivity.class); intent.putExtra(INTENT_LEVEL_NUMBER, levelNumber); intent.putExtra(INTENT_WORLD_NUMBER, worldNumber); startActivity(intent); </code></pre> <p>It runs good, but when it loads the other <code>Activity</code> (<code>PacManActivity</code>) it throws an exception:</p> <pre><code>FATAL EXCEPTION: main java.lang.NullPointerException at org.andengine.ui.activity.BaseGameActivity.onResumeGame(BaseGameActivity.java:220) at org.andengine.ui.activity.BaseGameActivity$4.run(BaseGameActivity.java:371) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3687) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(Native Method) </code></pre> <p>I'm not even implemented <code>onResumeGame()</code> method and if I start my <code>PacManActivity</code> by default (configured from <code>Manifest.xml</code>) it runs without any error.</p> <p>Could someone please help me with this problem.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload