0

I have a strange bug. I have an app with Google maps in it. When I install the app over Android Studio with USB it works. But when I generate a signed APK and install it - it doesnt work.

Do you know why?

UPDATE: The install works but I cannot see a map. Its just gray.

Ero Stefano
  • 556
  • 2
  • 9
  • 27

2 Answers2

1

When you install your app via usb you use a debug keystore. When you generate a signed apk, a 'real' keystore is used: What is difference between 'debug.keystore' and 'release.keystore' in Android?

You maps API key that you generated in the Google developer console is tied to one keystore / its SHA1, probably your debug one. You have to get an API key tied to your release keystore / it's SHA1.

Also see: Google map v2 doesn't work in play store

Community
  • 1
  • 1
fweigl
  • 21,278
  • 20
  • 114
  • 205
1

Go to your google developer console and add the SHA1 Key for your developer key that you used to generate the signed apk

if you don't know how to get the SHA1 , you can search for it or: let the app crash you can find the SHA1 in the error in the cat logs, the maps will complain about missing this fingerprint

Hassan Khallouf
  • 1,170
  • 1
  • 13
  • 30