After exporting apk the Google Maps do not show in application. Why does it happen?

后端 未结 3 1148
粉色の甜心
粉色の甜心 2020-12-21 14:49

I am using Google Maps V1 API key. If i Itaking the apk from bin folder, the Google Maps will shown in application. But if I export the project and deploy the exorted apk th

3条回答
  •  一整个雨季
    2020-12-21 15:35

    When you develop and run an application locally, you are actually signing it with a debug key.

    When you export, you are signing it with a different, production key.

    Google Maps requires your api key to match the key you sign your app with. So you will need 2 different api keys depending on whether your apk was made via debug key (copying it from "bin") or production (exporting).

    What's happening to you is when you export your app, the key is not matching what Google Maps API thinks it should be, so it's not working.

    Read more about signing apps here.

提交回复
热议问题