2

As mentioned in the title, the Maps Activity shows blank (with Google logo underneath) after I've uploaded the application. I am aware this question has been asked many times but none of the solution is able to resolve my issue.

This is what I've done so far:

  • Generated Google Maps Release API Key (with SHA-1 signature) following the official guide here and placed it under the release/res/values/google_maps_api.xml
  • Place the Release API Key hardcoded into the AndroidManifest.xml
  • Clean and rebuild the project

This is the result:

  • The Maps Activity just worked perfectly fine if the app-release.apk is installed manually to the device before upload to the Play Store.
  • The Maps Activity shows blank if the app-release.apk after the app-release.apk is uploaded to the Play Store.

Solution:

This answer solved the issue I am facing. The reason the Maps activity shows blank previously because Google Play re-signs the app with the original app signing key I've provided. So just copy the Google SHA-1 and paste it to the console where the Google Map API Key is generated.

Gideon
  • 69
  • 12
  • It has to be an API key access thing. Maybe you need to whitelist an IP address somewhere? – Tim Biegeleisen Aug 10 '17 at 02:56
  • I'm not really sure cause all the alpha testers seem to encounter the same issue. Can you provide more guide or link so I can go through and attempt it? – Gideon Aug 10 '17 at 02:59
  • 2
    Have you seen the following answer: https://stackoverflow.com/a/44672565/5140781? Looks like it explains how to solve your issue. – xomena Aug 10 '17 at 04:44
  • @xomena thanks! This answer https://stackoverflow.com/a/44672565/5284152 solved my question. The main reason it is not working previously because Google Play re-signs the app with the original app signing key I've provided. – Gideon Aug 10 '17 at 06:58

2 Answers2

3

If GMap activity is added in any project then there are two google_maps_api.xml.
One is for Debug and One is for Release.

enter image description here

Probably you've entered the key in Debug only as when we add Gmap activity, only google_maps_api.xml opens. So put your key in Release also. How?...see.

  1. Click on TODO on the Bottom bar of Android Studio. enter image description here
  2. Click on scope Based tab of TODO. enter image description here
  3. Now there are two google_maps_api.XML, open each and copy your key to XML with no key (YOUR_KEY_HERE). enter image description here This also happened with me.
Lalit Fauzdar
  • 5,953
  • 2
  • 26
  • 50
0

You have missed adding the permission, try checking by including the permission.

<uses-permission android:name="android.permission.INTERNET" />
Logo
  • 1,366
  • 2
  • 11
  • 16