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

前端 未结 30 2590
迷失自我
迷失自我 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 05:58

    In my case, with the same error exception, i put the "onBackPressed()" in a runnable (you can use any of your view):

    myView.post(new Runnable() {
                        @Override
                        public void run() {
                            onBackPressed()
                        }
                    });
    

    I do not understand why, but it works!

提交回复
热议问题