4

I developed an Android app which contains Map Activity. Before publishing the application and now the map works properly in the emulator, but the map in the app published in google play does not appear. there is no problem in the position of the device or in the locations where I search, also calculates the distance between the location of the device and the location where I search but the map is completely grayed out. How can I solve this problem?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Kemal Aydeniz
  • 119
  • 2
  • 10

3 Answers3

18

More than 2 days I try to find the answer. Finally, I found it. What I did was go to App signing under Release management on your google play console There will be two SHA-1 certificate fingerprint enter image description here

Then, go to your Google cloud console under Map API Key. Put both fingerprints that you obtain from App signing enter image description here

Voila!!!! a map is rendered :)

2

Seems like your API key for google maps is restricted.

For Android apps, you restrict the key to your app's package name and SHA-1 signing-certificate fingerprint.

You can see key restrictions in Google developer console Check the package name of local builds and published one. Then SHA1 of release and debug certificate. You can download release apk from Google Play console and get SHA1 of cert as described here.

nnesterov
  • 1,232
  • 1
  • 10
  • 27
  • i restricted app with package name and SHA-1 signing-certificate fingerprint on Google Developer Console before release app. Do you mean change to none restriction? – Kemal Aydeniz Nov 21 '18 at 11:43
  • No, please check your restrictions. Compare packageName of release app and SHA1 from key restrictions with real values from published apk. I've been in same situation. I just made a typo in package name. – nnesterov Nov 21 '18 at 13:02
0

I face the issue for the google map, In debug app and release apk before publish on the Google play store Google Map works fine. After publish app in Open testing or production it fails to load.

For this issue there are two possible solution

Solution 1 - Generate restricted release key for the android app, which already explained in above solutions

Solution 2 - In case of above solution not work, then please check the Google Claud platform (GCP) has activated the billing account.

Once you add the billing account it will work. Happy Coding ;)

Vivek Hande
  • 929
  • 9
  • 11