4

Ok, I want to preface that I have tried multiple solutions such as:

Android Studio - Google map still blank on real Android device

Android Google Maps API in Release not working

I've tried to obtain the SHA1 fingerprint, and added those "Restrictions" to the Google Developer Console API Credentials.

Also tried hardcoding the API into the manifest (can't find the link that recommended this).

At this point, I've narrowed it down to these possible issues:

1) The keystore I am using has the following line when checking it

Signature algorithm name: SHA256withRSA

I noticed that many of the solutions talked about having SHA1withRSA. But since this would require creating a new keystore, to which I would have to create a whole new app, I'm avoiding this conclusion.

2) I've also noticed that the Original APK uploaded to Play console actually works. But the Derived APK (which I assume is the one uploaded to the Play Store) does not work.

3) The API library in Google Developer Console does not have specifically

"Google Maps Android API v2"

It only shows "Google Maps Android API". I assume this shouldn't be the issue.

Just to clarify, the issue is that the Map in my app comes up blank.

A. Dee
  • 91
  • 1
  • 6
  • is the SHA key debug or release? – GGWP Jun 17 '17 at 01:08
  • @HUSTLE it is release. I noticed on some Android tutorials they used the debug key, but I had already known to use the release key. I'm not sure why the tutorials showed this. – A. Dee Jun 18 '17 at 02:30
  • You can have both SHA debug and release key in Google API console or Firebase, I'm glad you resolved your issue. – GGWP Jun 18 '17 at 02:35

3 Answers3

5

For derive apk google introduce App singing feature. Google sign you apk agian, so you have to get App Sigining certificate's SHA1 and set it into Google Cloud Platform (wher you set your package name and SHA1)

enter image description here

you find difference of SHA1 keys.

This feature main purpose is, for provide security by google itself, and if you lost key store then you will manage that situation very well.

check this link:

https://support.google.com/googleplay/android-developer/answer/7384423

Official Blog:

https://android-developers.googleblog.com/2017/09/enroll-for-app-signing-in-google-play.html

Vrajesh
  • 1,312
  • 19
  • 25
4

Ok, I just solved it (after making this post 13 minutes ago).

So after implementing this solution

Android Studio - Google map still blank on real Android device

I noticed that this error in my Android Monitor when running the apk from my phone:

Android Application (<cert_fingerprint>;<package_name>): <what I assume is a SHA1 fingerprint>;<my_package_name>

So I just copied the SHA1 fingerprint, added it to the API credential restrictions and saved it. And after a few minutes, ran the app again, and it worked.

No need to reupload/update apk.

Hope this helped anyone else.

A. Dee
  • 91
  • 1
  • 6
0

We need to get the SHA-1 certificate fingerprint from App sinning inside Google Play Console, if you want to release the app to Play store.

DangBaoLoc
  • 31
  • 5