If I remember correctly, All Fragments do not have a native findViewById()
method. This is why you have to use the onCreateView() method.
This means that you should change setUpMapIfNeeded()
to setUpMapIfNeeded(View view)
and in onCreateView()
pass off v to your modified method. You also need to change mMap = ((MapView) findViewById(R.id.map)).getMap();
to mMap = ((MapView) view.findViewById(R.id.map)).getMap();
.