-1
   Fatal Exception: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
   at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1500)
   at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1518)
   at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:634)
   at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:613)
   at android.support.v4.app.FragmentTabHost.onAttachedToWindow(FragmentTabHost.java:282)
   at android.view.View.dispatchAttachedToWindow(View.java:12779)
   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2592)
   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2599)
   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2599)
   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2599)
   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2599)
   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2599)
   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2599)
   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2599)
   at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1295)
   at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1063)
   at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5993)
   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
   at android.view.Choreographer.doCallbacks(Choreographer.java:574)
   at android.view.Choreographer.doFrame(Choreographer.java:544)
   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
   at android.os.Handler.handleCallback(Handler.java:733)
   at android.os.Handler.dispatchMessage(Handler.java:95)
   at android.os.Looper.loop(Looper.java:136)
   at android.app.ActivityThread.main(ActivityThread.java:5584)
   at java.lang.reflect.Method.invokeNative(Method.java)
   at java.lang.reflect.Method.invoke(Method.java:515)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
   at dalvik.system.NativeStart.main(NativeStart.java)
Abhishek Patel
  • 4,280
  • 1
  • 24
  • 38
Mehul
  • 9
  • 3

1 Answers1

1

Error is:

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

This error is more related to method calling order. I meant, you probably called some method but activity/fragment is in a state where it can not process that method.

This can be caused also by a fragment transaction at wrong time.

That's why you don't find the line number in the log.

You can search for this error and you will see different root causes. This may at least guide you to find the problematic point.

Please, update your question with "onSaveInstanceState" method. This way, we can try to help you more.

Or share more code....

For now, use these answers as reference:

Question1

Question2

Question3

Community
  • 1
  • 1
guipivoto
  • 18,327
  • 9
  • 60
  • 75