java.lang.RuntimeException: Unable to pause activity {com.music.track/com.music.track.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.media.MediaPlayer.isPlaying()' on a null object reference

Stack Overflow | Devansh | 5 months ago
  1. 0

    onPause() crashes when calling mediaplayer.isPlaying()

    Stack Overflow | 5 months ago | Devansh
    java.lang.RuntimeException: Unable to pause activity {com.music.track/com.music.track.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.media.MediaPlayer.isPlaying()' on a null object reference
  2. 0

    onPause() crashes when calling mediaplayer.isPlaying()

    Stack Overflow | 5 months ago | Devansh
    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
  3. 0

    Android - Same Content Uri giving null mediaPlayer

    Stack Overflow | 6 months ago | zek54
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.media.MediaPlayer.isPlaying()' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Why aren't my objects instantiating under certain resume conditions?

    Stack Overflow | 7 months ago | Travis Dewitt
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.drawable.BitmapDrawable.setVisible(boolean, boolean)' on a null object reference
  6. 0

    Runtime error

    GitHub | 2 years ago | johnamcruz
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.util.concurrent.atomic.AtomicBoolean.compareAndSet(boolean, boolean)' on a null object reference

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'boolean android.media.MediaPlayer.isPlaying()' on a null object reference

      at com.music.track.MainActivity.onPause()
    2. com.music.track
      MainActivity.onPause
      1. com.music.track.MainActivity.onPause(MainActivity.java:186)
      1 frame
    3. Android Platform
      ActivityThread.performPauseActivity
      1. android.app.Activity.performPause(Activity.java:6397)
      2. android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1380)
      3. android.app.ActivityThread.performPauseActivity(ActivityThread.java:3435)
      3 frames