we have an pretty big application, with a google map as the main activity, in the release mode and the debug mode it's working fine, but after publishing throgh play store, the map did not show anything but the google logo at the left bottom corner. the problem is the same at other applicaition we published to the play store. it is as simple as a one map activity application.
- it has two separate
google_maps_api.xml
files one insrc/debug/values
the other insrc/release/values
. Both auto generated by google's map template. - the file in
src/debug/values
has the sha1 commented inside it. which i used to restrict the debug api key. like here. i then wrote the key inside thegoogle_maps_api.xml
insrc/debug/values
. - then using
Build>Generate Singed Apk
i created a new key store, with the alias and the passwords. then i created a signed apk.app-release.apk
- I've checked
AndroidManifest.xml
. it calls the google maps key from the respective build variant. - then using the keystore with this command
keytool -list -v -keystore mystore.keystore
i generated the sha1 and created a new google maps key at the console, with this new sha1 and the same package name.
i did the configurations to enable the release mode inside Build Variants
, then i've tried both modes. it's working fine when i run it with android studio. but after uploading it to the market, i downloaded the market version to be surprised with a gray screen, no map!
other questions here where mostly talking about the map not showing at the release mode. i couldn't find any source talking about the problem after publishing, while working fine at the release mode.
things we tried:
- tried using two diffirent gmail accounts to generate the keys.
- tried uploading the files using two diffrent accounts.
- tried to do the whole thing from the start
i followed this doc: https://developers.google.com/maps/documentation/android-api/signup
any ideas or if you can see any flaws in our way, it will be helpful.