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

在运行app的时候java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState,这个问题出现的现象是在app打开的时候有Dialog(也可以是其它)弹出,让activity执行了onSaveInstanceState

解决办法就是把commit()方法替换成 commitAllowingStateLoss()就行了,其效果是一样的。

 

【声明】 


欢迎转载,但请保留文章原始出处


博客地址:http://www.cnblogs.com/lping/


文章来源:http://www.cnblogs.com/lping/p/5477561.html

posted on 2016-05-10 13:49  木头平  阅读(172)  评论(0编辑  收藏  举报

导航