5

I made an Android app that uses Google Maps API to display a map.
When I run it with android studio it works fine. However after I publish it on the play store and download it from there all the maps show up as just grey screens.

I registered a key on google development console with both the debug SHA-1 key, which I got through this command:

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

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

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

I've also unzipped my release APK and checked it with this command:

keytool -printcert -file CERT.RSA

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

Am I still getting the SHA-1 key for release incorrectly? Is there another way to get and verify it?

EDIT: I found the problem. It was like the top reply in Android SHA1 release keystore not working with Google Maps said. There were two google_maps_api.xml files, one in debug and one in release and android studio only showed the debug one. Manually editing the release xml to add the key fixe it.

Community
  • 1
  • 1

0 Answers0