java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

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

Solutions on the web

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1330)
at android.app.FragmentManagerImpl.popBackStackImmediate(FragmentManager.java:497)
at android.app.Activity.onBackPressed(Activity.java:2485)
at android.app.Activity.onKeyUp(Activity.java:2459)
at android.view.KeyEvent.dispatch(KeyEvent.java:2631)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:3961)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3923)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3487)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3540)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3506)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3616)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3514)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3673)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3487)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3540)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3506)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3514)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3487)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3540)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3506)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3649)
at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:3815)
at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:2227)
at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:1868)
at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:1859)
at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:2204)
at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:122)
at android.app.ActivityThread.main(ActivityThread.java:5238)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)

Users with the same issue

2 times, 1 month ago
2 times, 6 months ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago
Once, 1 year ago
Once, 1 year ago
8 more bugmates

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