Google google maps gray screen after publishing apk in play store

I made an Android app that uses the Google Maps API to display a map.
When I run it in android studio, it works great. However, after I publish it in the play store and download from it, all maps are displayed as gray screens only.

I registered the key on the Google console for development using the SHA-1 debug key, which I received through this command:

keytool -list -v -keystore "% USERPROFILE% .android \ debug.keystore" -alias androiddebugkey -storepass android -keypass android

And the release SHA-1 key I got with this command:

keytool -list -v -keystore [my \ keystore \ path] -alias [releaseAlias] -storepass [storepass] -keypass [keypass]

I also unpacked my version of the APK and tested it with this command:

keytool -printcert -file CERT.RSA

And it shows the same SHA-1 key as above.

Am I still giving the SHA-1 key incorrectly? Is there any other way to get and check it out?

EDIT: I found a problem. It was like the main answer in the Android SHA1 keystore not working with Google Maps . There were two google_maps_api.xml files, one in debugging and one in release, and Android studio was only debugging. Manually edit the xml version to add the key.

+4
source share

All Articles