Android - SupportMapFragment with GoogleMaps API 2.0 giving IllegalArgumentException

前端 未结 11 1746
情书的邮戳
情书的邮戳 2020-11-27 04:17

I am trying to use the latest Map API 2.0 provided for Android. I am using the Support Library as I want to support Android 2.2. Following is my code:

Main A

11条回答
  •  一整个雨季
    2020-11-27 04:48

    Fragment fragment = (getChildFragmentManager().findFragmentById(R.id.mapview));
    FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
    ft.remove(fragment);
    ft.commit();
    

    Use this saves the day.

提交回复
热议问题