Fragment activity crashes on screen rotate

前端 未结 5 624
刺人心
刺人心 2021-01-01 18:22

I have a simple fragment activity. In the onCreate() method, I simply add a fragment. The code is posted below. However, each time I rotate the screen, system will call onCr

5条回答
  •  旧巷少年郎
    2021-01-01 18:56

    I faced the similar problem when I renamed my project package name. The fragment class is referred by xml layout and usually contains the full package name.Thats where the problem was. My fragment class name was still having old package name.

提交回复
热议问题