Alexandre Daubois Alexandre Daubois - 1 year ago 136
Android Question

Google Maps API Key in release build doesn't work

I'm currently developing an application for Android and I'm using Google Maps API. In developer console, I added my SHA1 certificate print, followed by my package name.
Even though I put this SHA1 certificate print using keytool, I can't access to the maps.
I made lots of search, but every topics brought me to answers where error were in a wrong API Key in developer console.
But I took the right SHA1, the one of my certificate.

Thanks in advance !

Answer Source

I had this same problem, it was super frustrating. What I ended up doing was taking the key I made using my release keystore and putting it in the google developers console. Then, added the following into the android manifest.

        android:value="KEY GOES HERE"/>

I'm sure you read the documentation on this, but make sure you follow the instructions for the release certificate to the dot.

You could also follow the link that was generated for you in the google_maps_api.xml file. This automates the process of entering the key into the developer console. However, make sure you still add that meta data value into your manifest.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download