Google Maps API Key in release build doesn't work

My Map in release mode was showing but after I publish to Play Store it was not showing.

I had mentioned both debug and release certificate SHA-1 Key to Google Developer Console but map in release mode after downloading app from play store was still not showing.

Here' what was problem: Google Play App Signing is enabled for this app

Goto Release Management -> App Signing -> and copy the SHA-1 certificate fingerprint from App signing certificate

Paste this newly copied SHA-1 fingerprint to Developer Console and map in release mode will show.


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.

<meta-data
        android:name="com.google.android.geo.API_KEY"
        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.

https://developers.google.com/maps/documentation/android/signup

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.


The file google_maps_api.xml has to be under res/debug/ and res/release. The editor only shows your current run configuration which is debug by default and is a bit misleading if you do not observe the (debug) note after the folder name. Copy the google_maps_api.xml into both folder and edit make sure they have the correct API keys ofr each build.