java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.MediaPlayer.pause()' on a null object reference at ...ColorsFragment$1.onAudioFocusChange(ColorsFragment.java:26) at ...AudioManager$FocusEventHandlerDelegate$1.handleMessage(AudioManager.java:2147) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by tom-james
, 1 year ago
Attempt to invoke virtual method 'void android.media.MediaPlayer.pause()' on a null object reference at ...ColorsFragment$1.onAudioFocusChange(ColorsFragment.java:26) at ...AudioManager$FocusEventHandlerDelegate$1.handleMessage(AudioManager.java:2147) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148)
via Stack Overflow by user59053
, 2 years ago
Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference 01-01 22:53:40.994: W/System.err(13438): at com.wifiTest.TurnOnWIfiTestAction.turnOnWifi
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.MediaPlayer.pause()' on a null object reference at ...ColorsFragment$1.onAudioFocusChange(ColorsFragment.java:26) at ...AudioManager$FocusEventHandlerDelegate$1.handleMessage(AudioManager.java:2147) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.