App会在随机时间和radom设备中抛出异常。它实际上来的时候我没有得到。我刚收到太多关于这个结构的崩溃报告。
Fatal Exception: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.support.v4.app.FragmentManagerImpl.checkStateLoss(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.modifiesAlpha(Unknown Source)
at android.support.v4.app.BackStackRecord.dump(Unknown Source)
at android.support.v4.app.BackStackRecord.dump(Unknown Source)
at com.example.MyAcvitity.ShowDialogBox(Unknown Source)
at com.example.MyAcvitity.ShowDialogBox(Unknown Source)
at com.example.MyAcvitity$3.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5351)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:947)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:742)
我试过..
@Override
protected void onSaveInstanceState(Bundle outState) {
//No call for super(). Bug on API Level > 11.
// override this method to avoide (java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState) this exception
}
但仍然给出相同的例外。
MyActivity包含片段。 我怎么从这个出来?