Reputation: 362
I am using Google Map in my android. It was working fine. Today I implemented Google Places API, after that when I build release APK, map is not working. I don't know that it is because of Google Places API or because of something else. I cross verified SHA1 key, keystore file. I am unable to find the issue. I am using these dependencies:
implementation 'com.google.android.gms:play-services-maps:17.0.1'
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation "com.google.android.gms:play-services-gcm:17.0.0"
On opening map, it is showing blank map.
I am facing it only on release (signed) apk, not on debug apk. Screenshot is:
Upvotes: 1
Views: 1172
Reputation: 374
if you have restricted your maps api key with SHA1
check if your put release SHA1 not debug one
Upvotes: 0
Reputation: 51
You should make sure that you set your release API key.
src/release/res/values/google_maps_api.xml
Since android generates two different xml files for google maps. One for debug and One for release. You probably have your API key placed on debug only.
Upvotes: 1