Got exception: fragment already active

前端 未结 8 1667
攒了一身酷
攒了一身酷 2021-01-30 12:49

I have a fragment;

MyFragment myFrag = new MyFragment();

I put bundle data to this fragment:

         


        
8条回答
  •  迷失自我
    2021-01-30 13:07

    1. Check whether your layout current one or old one for example

      setContentView(R.layout.activity_main);
      
    2. Delete old .gradle file in your project file and rebuild gradle file for project.

提交回复
热议问题