Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
leguang opened this issue Aug 1, 2017 · 1 comment

Comments

@leguang
Copy link

leguang commented Aug 1, 2017

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行

  @Override
                public boolean onFinish(File file) {
                    if (!UpdateDialogFragment.this.isRemoving()) {
                        dismiss();
                    }
                    return true;
                }

中的dismiss();
测试时用的华为和小米,系统版本分别是4.4和5.0,两者都会出现这种情况。你可以试一下。

@WVector
Copy link
Owner

WVector commented Aug 2, 2017

v3.3.2 已修复,谢谢反馈

@WVector WVector closed this as completed Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants