getting exception “IllegalStateException: Can not perform this action after onSaveInstanceState”

前端 未结 30 2033
迷失自我
迷失自我 2020-11-22 05:12

I have a Live Android application, and from market i have received following stack trace and i have no idea why its happening as its not happening in application code but it

30条回答
  •  北海茫月
    2020-11-22 06:02

    Such an exception will occur if you try to perform a fragment transition after your fragment activity's onSaveInstanceState() gets called.

    One reason this can happen, is if you leave an AsyncTask (or Thread) running when an activity gets stopped.

    Any transitions after onSaveInstanceState() is called could potentially get lost if the system reclaims the activity for resources and recreates it later.

提交回复
热议问题