Skip to content Skip to sidebar Skip to footer

Google Map Showing Blank In Genymotion

I am using Google Nexus 4.2.2 - with Google API on Genymotion. The google maps fragment is coming up empty. I have registered with the API and providing the key in the manifest fil

Solution 1:

Inorder to use google maps v2 in our android application, one must use google-play-services library. This Library works only if context is passed to check whether services is available to that devices. Add this line in your oncreate

GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());

Comment me about the result

Solution 2:

Check the output log, search on maps, and see if warnings notices come up. In my case, I found:

09:03:34.197 E/Google Maps Android API( 7012): Authorization failure.  Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.03-22 09:03:34.198 E/Google Maps Android API( 7012): In the Google Developer Console(https://console.developers.google.com)03-22 09:03:34.198 E/Google Maps Android API( 7012): Ensure that the "Google Maps Android API v2" is enabled.
03-22 09:03:34.198 E/Google Maps Android API( 7012): Ensure that the following Android Key exists:

Double check on the following:

  • That you gave the correct SHA1 fingerprint of your application in google developer console (For me, somehow this changed)
  • That you gave the correct package name
  • That you included they API key in the manifest file (Obvious, yes, I know)
  • That the proper permissions are also set in manifest ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION ACCESS_LOCATION_EXTRA_COMMANDS ACCESS_MOCK_LOCATION

  • If using an emulator, insure that Google Play Services (including Maps) is installed.

More detailed directions can be found here.

Solution 3:

In my case , I did not find a solution,the map is blank when it is opened and navigating the map does nothing , but I had a PlaceAutocompleteFragment and when i use it to search for a place I move the map to that place and it works , the map is now shown and you can navigate it . you don't have to use PlaceAutocompleteFragment you can just get around the problem by moving the camera to a place you want when the map loads and then navigate from there , this can be done by adding this to the onMapReady() function :

LatLnglatLng=newLatLng(15.501501,32.4325101) ;// change to the value you wantfloatzoom=15.0f;
mapfragment.getMap().moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, zoom));

Post a Comment for "Google Map Showing Blank In Genymotion"