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

后端 未结 3 1133
粉色の甜心
粉色の甜心 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:30

    I put the key directly in the manifest and began to work.

    0 讨论(0)
  • 2020-12-21 15:31

    Please follow these steps to get Release SHA1

    1. Find your .jks path which is used while creating signed apk.

      Ex: /Users/dharm/Documents/Android/test.jks

    2. Copy your jks file name and put in the end of line number 3

      Ex: test.jks

    3. Open your terminal and enter this command keytool -list -v -keystore "keystorepath" -alias "keyalias"

      Ex: keytool -list -v -keystore /Users/dharm/Documents/Android/test.jks -alias test

    4. When you will press enter it will ask for Enter keystore password. So please enter your key store password.

    5. If you do all the steps successfully then you will get entire information of this certificate(key store).

      Ex:

      MD5: D2:52:A1:7C:14:9F:D5:DD:64:35:E2:3F:74:CA:C5:E7

      SHA1: D3:32:AA:09:81:71:50:D2:47:20:43:B2:13:A2:D5:55:4B:A7:DC:3C

      SHA256: 27:8A:84:C5:C3:CE:98:47:A7:73:E2:87:91:5E:5A:A2:F4:B8:D4:D4:0E

    6. Now you can put this SHA1 key on google console( SHA-1 certificate fingerprint).

    Hope it will help you.

    For Video Kindly have a look on it

    https://www.youtube.com/watch?v=g75cZXjmuj8&feature=youtu.be

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题