2

I've implemented Google Map in my application. Everything works correct in Debug version. But as soon I generate Release APK, Google Map is not working

I have done All process for (SHA-1 key and package), but I'm facing the same problem.

I have seen the "questions that may already have your answer", but I'm not satisfied with those answers.

halfer
  • 19,824
  • 17
  • 99
  • 186
Seema
  • 53
  • 1
  • 12
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Feb 24 '18 at 08:27

2 Answers2

12

Debug certificate is different from your production certificate. You need to add both to your Google Maps key entry in your API console as seaparate row - each with the same packageId, but naturally different SHA1 hash.

OR

Maybe you have two google_maps_api.xml files, one in the app/src/debug/res/values folder and the other in the app/src/release/res/values folder, but only the debug one contains your API key.

Rushabh Shah
  • 680
  • 4
  • 22
1

you can follow this steps to working google map in both debug and release mode https://stackoverflow.com/a/17141660/8118033

Hiren Nakrani
  • 234
  • 3
  • 15