Skip to content Skip to sidebar Skip to footer

Getmap() Returning Null

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 th

Solution 1:

Try Changing it like that

GoogleMap googleMap;

MapFragmentfm= (MapFragment) getFragmentManager().findFragmentById(R.id.myMapView);


googleMap = fm.getMap();

If you are running it in Emulator you need to install two apk files (Read this Post)

If you have tweaked the Emulator and installed the two files already then you have to change the Google_Play_services_lib to version 4 (download it here)

Just replace the new Google_Play_services_lib with the old version#4 in eclipse and reference this to the project.

Solution 2:

Apparently the line

05-09 12:49:34.282: W/GooglePlayServicesUtil(5928): Google Play services out of date.  Requires 3027100 but found 2012110

tells us why the map isn't instantiated.

You need to have a current version of Google Play services on your device or else you get this: This app won't run without Google Play Services and getMap() will return null.

Post a Comment for "Getmap() Returning Null"