I am trying to load Google Maps inside fragment ,and I keep getting the same error regardless of what solution I am trying to implement. I have already gone though all of t
You can do this as a normal fragment.
public void replaceFragment(Fragment fragment, String fragmentTag){
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.container, fragment);
fragmentTransaction.addToBackStack(fragmentTag);
fragmentTransaction.commit();
}
private void initMap(){
MapFragment mapFragment = MapFragment.newInstance();
replaceFragment(mapFragment, fragmentTag);
mapFragment.getMapAsync(this);
}