I made a small app in android studio, which is tic tac (XO)
game. All was working fine and I've tested the app on the emulator many times. But at a moment the application crashed and the well known message says: Unfortunately, "tictactoe has stopped". And then I wasn't even able to start the app, all the time it crashes when trying to run it.
Android logcat showed those messages:
E/AndroidRuntime: FATAL EXCEPTION: main
E/AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {.tictactoe/.tictactoe.MainGame}: java.lang.NullPointerException
E/AndroidRuntime: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2575)
E/AndroidRuntime: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2603) E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2089) E/AndroidRuntime: at android.app.ActivityThread.access$600(ActivityThread.java:130)
With many more messages. Any help?
Update: more logcat:
E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime: at android.os.Looper.loop(Looper.java:137)