java.lang.RuntimeException: Unable to destroy activity {com.demo.app.template.debug/com.demo.app.template.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.Activity.isChangingConfigurations()' on a null object reference

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 GitHub by chris6647
, 1 year ago
Unable to destroy activity {com.demo.app.template.debug/com.demo.app.template.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.Activity.isChangingConfigurations()' on a null object reference
via Stack Overflow by Duke
, 4 months ago
Unable to destroy activity {com.google.android.wearable.app/com.google.android.clockwork.home.HomeActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getHeight()' on a null object reference
via GitHub by arvinpan
, 1 year ago
Unable to destroy activity {com.ichi2.anki/com.ichi2.anki.Reviewer}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.FrameLayout.removeAllViews()' on a null object reference
via Stack Overflow by faisal1208
, 8 months ago
Unable to stop activity {com.example.accurat.myapp/com.example.accurat.myapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.common.api.GoogleApiClient.disconnect()' on a null object reference
via GitHub by mfietz
, 1 year ago
Unable to stop activity {de.danoeh.antennapod/de.danoeh.antennapod.activity.AudioplayerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void de.danoeh.antennapod.activity.AudioplayerActivity$AudioplayerPagerAdapter.setController(de.danoeh.antennapod.core.util.playback.PlaybackController)' on a null object reference
via Stack Overflow by MaxGyver
, 9 months ago
Unable to destroy activity {com.myapp/com.myapp.FileListActivity}: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
java.lang.RuntimeException: Unable to destroy activity {com.demo.app.template.debug/com.demo.app.template.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.Activity.isChangingConfigurations()' on a null object reference
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3831)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3849)

Users with the same issue

6 times, 10 months ago
Once, 1 year ago
11 times, 1 year ago
7 times, 3 months ago
4 times, 1 year ago

Write tip

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