My getMap() method is returning null. Why is this method returning null? I looked on the Android Developers documentation to make sure I'm using this method correctly. Here a the line of code that I'm using to get the map:
mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.myMapView)).getMap();
Here is my Java code:
private ProjectionProxy proxy = new ProjectionProxy();
private GoogleMap mMap;
@Override
protected void onCreate(Bundle load) {
super.onCreate(load);
setContentView(R.layout.fragment_ride_tracking);
mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.myMapView)).getMap();
Log.e("RideTracking", "Google Map VALUE:"+mMap);
if (mMap != null) {
proxy.setProjection(mMap.getProjection());
}
Here is my XML code for that particular piece of code:
<fragment
android:id="@+id/myMapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"/>
Here is the logcat output:
05-09 12:49:34.282: W/GooglePlayServicesUtil(5928): Google Play services out of date. Requires 3027100 but found 2012110
05-09 12:49:34.282: E/RideTracking(5928): Google Map VALUE:null
05-09 12:49:34.302: E/OGT.GPSLoggerServiceManager(5928): No GPSLoggerRemote service connected to this manager
05-09 12:49:34.322: W/dalvikvm(5928): Unable to resolve superclass of Lcom/android/gpstracker/viewer/FixedMyLocationOverlay; (2174)
05-09 12:49:34.322: W/dalvikvm(5928): Link of class 'Lcom/android/gpstracker/viewer/FixedMyLocationOverlay;' failed
05-09 12:49:34.322: W/dalvikvm(5928): Unable to resolve superclass of Lcom/android/gpstracker/viewer/FixedMyLocationOverlay; (2174)
Any help would be greatly appreciated!