if anyone else encounters this problem:
this happened to me because we need two google maps api keys, one for debugging and one for release, you can check:
C: \ Users \ username \ AndroidStudioProjects \ yourapp \ app \ src \ debug \ res \ values, and you will find XML with your API key, for example:
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">AIza...etc</string>
but if you check here:
C: \ Users \ username \ AndroidStudioProjects \ yourapp \ app \ src \ release \ res \ values you will find XML, but without an API key inside, for example:
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">YOUR_KEY_HERE</string>
this was noted as a comment inside the xml file itself:
Before you release the app, you need the Google Maps API key.
To do this, you can either add your release key credentials to your existing key, or create a new key. Note that this file specifies the API key for the release build target. If you have previously set up a key for the debug target with the debug signing certificate, you will also need to set up a key for your release certificate. Follow the directions here: https://developers.google.com/maps/documentation/android/signup Once you have your key (it starts with "AIza"), replace the "google_maps_key" string in this file.
source share