问题记录:Can not perform this action after onSaveInstanceState

报错:Can not perform this action after onSaveInstanceState
原因:fragmenttransaction的commit方法调用报错
解决方案:替换commitNow为commitNowAllowingStateLoss
参考:https://blog.csdn.net/swer0808/article/details/92985282

发布了33 篇原创文章 · 获赞 2 · 访问量 3万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章