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

atlassian.net | 3 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    [MA-2929] Android - App crashes randomly on 'My Courses' screen - JIRA

    atlassian.net | 3 months ago
    java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
  2. 0
    samebug tip
    If you're using nested fragments, you have to use childFragmentManager instead of fragmentManager.
  3. 0
    samebug tip
    As of SDK 23, you have to call this method with ContextCompat.getColor(context, R.color.my_color) so it works with previous API as well. Also, you have to add the support V4 library to your dependencies: "compile 'com.android.support:support-v4:23.0.1'"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    When you use findViewById inside an activity it is going to look for a View inside your main_activity.xml. If it's not there, it throws this exception, try to use the right view to call findviewById.
  6. 0

    wolverine watdatt - Google+

    google.com | 1 year ago
    java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
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.IllegalStateException

    Can not perform this action after onSaveInstanceState

    at android.support.v4.app.FragmentManagerImpl.checkStateLoss()
  2. Android Support v4
    DialogFragment.show
    1. android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1493)
    2. android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1511)
    3. android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:638)
    4. android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:617)
    5. android.support.v4.app.DialogFragment.show(DialogFragment.java:139)
    5 frames
  3. org.edx.mobile
    ErrorHandlingCallback.onFailure
    1. org.edx.mobile.base.BaseFragmentActivity.showErrorDialog(BaseFragmentActivity.java:541)
    2. org.edx.mobile.base.BaseSingleFragmentActivity.onMessage(BaseSingleFragmentActivity.java:125)
    3. org.edx.mobile.http.ErrorHandlingCallback.onFailure(ErrorHandlingCallback.java:199)
    3 frames
  4. retrofit2
    ExecutorCallAdapterFactory$ExecutorCallbackCall$1$2.run
    1. retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$2.run(ExecutorCallAdapterFactory.java:77)
    1 frame
  5. Android Platform
    ActivityThread.main
    1. android.os.Handler.handleCallback(Handler.java:733)
    2. android.os.Handler.dispatchMessage(Handler.java:95)
    3. android.os.Looper.loop(Looper.java:157)
    4. android.app.ActivityThread.main(ActivityThread.java:5356)
    4 frames
  6. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:515)
    2 frames
  7. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
    2 frames
  8. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame