2
  1. I have created an API Key in the Google Console API Credentials Page.
  2. I have restricted access to Android Apps
  3. I have added my package and the SHA-1 Key (generated using keytool and local keystore file).
  4. I have added the key generated to the google_maps_api.xml under src/main/res/values/ folder.

When I build the release app and have it downloaded from my website, then google maps is showing as expected. However, when I push this to play store for beta testing, google maps doesn't show.

I have tried multiple tutorials but nothing seems to work so far.

What else should I be doing? Any suggestion will be most welcome.

nguni52
  • 134
  • 10

2 Answers2

0

I had same issue, because sometimes google_maps_api.xml file created as two types (release and debug one). You can solve this by

1.Creating release version of google_maps_api.xml

or

2.Providing your API_KEY directly on manifest.xml like

<meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSkjoivhTt2F1vv_14nYsF90cqpRK0FeyLbU8" />
Sathish Kumar
  • 919
  • 1
  • 13
  • 27
  • Thanks for your answer. I had already put the above in the project. The issue was completely different from what I thought it was. – nguni52 Nov 13 '17 at 18:37
0

It seems that when I run keytool -list -v -keystore mystore.keystore The SHA-1 fingerprint that I was getting is not the one that should be in the console. I connected my device to Android Studio and watched Logcat, and filtered my app name. I noticed the error that showed which fingerprint is being used.

I pasted this SHA-1 certificate fingerprint back into the google maps console, waited 5 minutes and all is working now.

I don't understand how is it that when I run the keytool command it is giving a different SHA-1 key from the one that I saw in the logcat console.

nguni52
  • 134
  • 10