Search code examples
androidapigoogle-mapskeysha1

Google map api not showing in app when published to playstore


Map does not show in an app I've published.

Here is what I've done:

  1. created API key and added Package name and SHA-1 certificate fingerprint via restricting usage to Android apps in the credentials tab of the Google API manager

I am confused as to which SHA-1 certificate fingerprint I need to use so I created a key for each. I found 4 SHA-1 certificate fingerprints from:

  1. keytool -list -v -keystore mystore.keystore command
  2. from the comments in the google_maps_api.xml file
  3. from the Google Play console App signing certificate
  4. from the Google Play console Upload certificate

I am unfamiliar with App Signing and if there is anything more I need to do please let me know. I very much want the map to appear on the app! If someone could show me the steps to make this happen pleas help me!!!!! :(


Solution

  • There are two google_maps_api.xml files in the app one for debug and another for release.

    release : app\src\release\res\values\google_maps_api.xml

    debug : app\src\debug\res\values\google_maps_api.xml

    In your case the api key might be blank in release google_maps_api.xml

    and if you didn't copy SHA1 App signing in Play store. replace with existing SHA1