So I have an empty fragment that contains a map fragment. Whenever I try to activate the fragment containing the map, my app crashes and returns a null pointer error on this
I have solved the issue. this line when I have a viewpager:
mMap = ((SupportMapFragment) MainActivity.fragmentManager .findFragmentById(R.id.mapView)).getMap();
you have to change to this:
mMap = ((SupportMapFragment) getChildFragmentManager() .findFragmentById(R.id.mapView)).getMap();