I have a google map in a fragment in my application. Funny thing is that the map loads, but the logcat displays a NullPointerException
Just do like the below
@Override
public void onMapReady(GoogleMap googleMap) {
MapsInitializer.initialize(getContext());
map = googleMap;
map.setMyLocationEnabled(true);
// Updates the location and zoom of the MapView
CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(43.1, -87.9), 10);
map.animateCamera(cameraUpdate);
}