Google Map Android API v2 can't display map in play store application

前端 未结 5 1208
滥情空心
滥情空心 2020-11-30 08:02

I am working with the Google Map Android API v2 in an android application.

It works fine with the unsigned apk on a different device. B

相关标签:
5条回答
  • 2020-11-30 08:36

    Just check your google_maps_key under the src/release directory, you should place there your own key from the google console (the one you got with the release fingerprint SHA1).

    0 讨论(0)
  • 2020-11-30 08:42

    This happens because mapApi key is different for signed apk and unsigned apk.

    You have to generate SHA1 key using your keystore with which you singned your apk.

    Don't worry just follow the steps.

    open terminal and fire command

    keytool -list -alias -keystore -v

    Alias name: abcd

    Creation date: 15 Mar, 2013

    Entry type: PrivateKeyEntry

    Certificate chain length: 1

    Certificate[1]:

    Owner: CN=abc, OU=abc, O=abc, L=abc, ST=abc, C=91

    Issuer: CN=abc, OU=abc, O=abc, L=abc, ST=abc, C=91

    Serial number: 5142a21d

    Valid from: Fri Mar 15 09:52:53 IST 2013 until: Sat Mar 03 09:52:53 IST 2063

    Certificate fingerprints:

     MD5:  D3:CA:6D:F4:5E:B6:E1:48:F1:D6:DB:C4:67:F5:C3:B2
    
     SHA1: 03:D8:EF:05:04:CF:06:86:15:1A:F1:D3:B1:18:46:xx:xx:xx:xx:xx
    
     Signature algorithm name: SHA1withRSA
    
     Version: 3
    

    Take SHA1 key from List

    Open your google api console and generate new key and give SHA1 key with your packagename

    03:D8:EF:05:04:CF:06:86:15:1A:F1:D3:B1:18:46:F5:xx:xx:xx:xx;yourpackagename

    Put the new map api key in your code.

    0 讨论(0)
  • 2020-11-30 08:42

    what i have used for SHA1 key isenter image description here

    for debug key need to use from preference sha 1 finger print..

    enter image description here

    0 讨论(0)
  • 2020-11-30 08:50

    What type of keystore you are using? there are two keys. Debug and release key. If you use debug key and uploaded in android market, map will look blank. Use release key when you signed your apk.

    Release key procedure

    Step 1:

    Say for example your apk name is A and you are signing and creating a keystore for A.apk ie A.keystore will be created in some drive location.Let's consider it in E drive.

    step 2:

    Now locate to jdk in C drive(Considering for windows and assigning C drive)

    C:\Program Files\Java\jdk1.7.0\bin>keytool -list -v -keystore E:\A.keystore -alias A
    

    So it will create SHA-1 finger print.

    0 讨论(0)
  • 2020-11-30 08:54

    Create release key for android map using the key you have used to create your release. It will work.

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