java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1842)
at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1860)
at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:650)
at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:609)
at android.support.v4.app.DialogFragment.dismissInternal(DialogFragment.java:205)
at android.support.v4.app.DialogFragment.dismiss(DialogFragment.java:171)
at com.vector.update_app.UpdateDialogFragment$4.onFinish(UpdateDialogFragment.java:312)
at com.vector.update_app.service.DownloadService$FileDownloadCallBack.onResponse(DownloadService.java:256)
at com.vector.appupdatedemo.http.UpdateAppHttpUtil$3.onResponse(UpdateAppHttpUtil.java:102)
at com.vector.appupdatedemo.http.UpdateAppHttpUtil$3.onResponse(UpdateAppHttpUtil.java:89)
at com.zhy.http.okhttp.OkHttpUtils$5.run(OkHttpUtils.java:256)
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:5315)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)
at dalvik.system.NativeStart.main(Native Method)
你好,无意间发现这个库,非常感谢你提供这么方便的库,不过今天下载你的demo尝试时:点击下载,然后按home键返回桌面做其他的事,在下载完了之后就会出现这个异常。 定位错误出现在demo中的UpdateDialogFragment的312行
中的dismiss(); 测试时用的华为和小米,系统版本分别是4.4和5.0,两者都会出现这种情况。你可以试一下。