It sounds like you only have the API key entered in the debug google_maps_api.xml. Also, it sounds like you're using the same API key for debug and release, but you still need to enter it in the google_maps_api.xml under the release folder as well as the one in the debug folder.
It's a little confusing, because when the project is in Android view, you can only see the debug file (although it should have (debug)
in parenthesis next to it in that view).
In order to modify the release version, switch to Project view by using the dropdown in the upper left of the Project Explorer. Then, expand app/src/
, and you will see subfolders debug
and release
. Under there, you should see two separate google_maps_api.xml files under debug/res/values
and release/res/values
.
Make sure that the API key is populated in the google_maps_api.xml file under the release/res/values
folder, since this is the one that will be used for the signed release apk.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…