java.lang.RuntimeException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

    • java.lang.RuntimeException: Unable to pause activity {com.music.test/com.music.test.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.media.MediaPlayer.isPlaying()' on a null object reference at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3454) at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3408) at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3383) at android.app.ActivityThread.access$1100(ActivityThread.java:154) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1391) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:152) at android.app.ActivityThread.main(ActivityThread.java:5497) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.media.MediaPlayer.isPlaying()' on a null object reference at com.music.test.MainActivity.onPause(MainActivity.java:181) at android.app.Activity.performPause(Activity.java:6397) at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1380) at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3435)
    No Bugmate found.