Skip to content Skip to sidebar Skip to footer

Google Maps Blank On Real Android Device - But Works On Emulator

Hola, I am trying to get the maps to work, it appears to work fine the the Nexus 6 emulator, however when I run it on a Moto G or a Samsung Galaxy the map is completely bank - it

Solution 1:

This line in your logcat seems to be the problems:

02-2310:02:01.5915760-5760/com.companyperth.companytools E/GMPM: GoogleService failed to initialize, status: 10, Missing an expected resource: 'R.string.google_app_id' for initializing Google services.  Possible causes are missing google-services.json or com.google.gms.google-services gradle plugin.

It looks like Google Play services is not properly setup. You need to get google-services.json and put it into your project. To set up Google Play Services correctly, see Google APIs for Android.

You need to generate SHA1 fingerprint in order to get the Android key if you are using Google Maps for Android. See Get API key - Google Maps for Android. However, if you are using the Google Maps Javascript API(integrated into Android) you will not need to generate SHA1 fingerprint as you will be using Server Key.

Post a Comment for "Google Maps Blank On Real Android Device - But Works On Emulator"