Google Maps V2 - Error inflating class Fragment

后端 未结 15 1641
清歌不尽
清歌不尽 2020-12-03 01:04

I\'m trying my hand and Android Application Development. I\'m currently using Eclipse (I can\'t remember the version, whatever the newest is). I\'ve crossed a bridge where I

15条回答
  •  独厮守ぢ
    2020-12-03 01:28

    Just include the following line of code on onDestroy()

    SupportMapFragment mapFragment = ((SupportMapFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.map_location_sharing));
    
    if(mapFragment != null) {
        FragmentManager fM = getFragmentManager();
        fM.beginTransaction().remove(mapFragment).commit();
    

    It worked for me.Hopefully gonna work for you too. Thanks

提交回复
热议问题