2014年6月22日 星期日

【Android】Android app error - Duplicate id 0x7f04000f, tag null, or parent id 0x0 with another fragment for com.google.android.gms.maps.SupportMapFragment

   1: @Override
   2: public void onDestroyView() {
   3:     super.onDestroyView();
   4:     FragmentManager fm = getActivity().getSupportFragmentManager();
   5:     Fragment fragment = (fm.findFragmentById(R.id.map));
   6:     FragmentTransaction ft = fm.beginTransaction();
   7:     ft.remove(fragment);
   8:     ft.commit();
   9: }

沒有留言:

張貼留言