Google Maps API Key in release build doesn't work

后端 未结 5 817
南方客
南方客 2020-12-30 09:36

I\'m currently developing an application for Android and I\'m using Google Maps API. In developer console, I added my SHA1 certificate print, followed by my package name. Ev

5条回答
  •  粉色の甜心
    2020-12-30 10:00

    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.

提交回复
热议问题