Google map v2 doesn't showing after publishing in play market

只谈情不闲聊 提交于 2019-12-25 04:33:24

问题


I have a problem with my google map in my android app after publishing. In developer console I've enabled "Google Maps Android API v2", added SHA1 key + package: 4D:8A:1F:C1:2D:8F:AD:EE:13:6A:AE:D0:FB:98:56:A1:76:70:84:2A;com.mypackage, got API KEY and added it in android manifest.

But after I publish my app I got a message:

Ensure that the "Google Maps Android API v2" is enabled. Ensure that the following Android Key exists: API Key: AIzaSyBt8ERGTRg8dMQy62FHoDbhaVs7YrG52iA Android Application (;): AA:08:25:A3:7B:3C:DD:C3:2D:7C:66:CE:67:47:8D:54:B9:3B:8A:21;com.mypackage.

As you can see SHA1 in message and in my project are different. Why? Whats wrong?


回答1:


No need to change the code if the map working good in normal .apk

You need to create a relase certificate fingerprints below is the step to generate the release certificate fingerprints

1.once you make a sign .apk,generate a release certificate signature and update on google console the google map aumocatically works.

2.Go to the Google Developers Console and log in with your Google account. Select the Google Maps API for Work Project from the project drop-down in the top left of the Google Developers Console. This project was created for you when you ordered the Google Maps Mobile SDK for Work. If you have not yet purchased access to the SDK, please contact sales.

3.In the sidebar on the left, select Credentials.

4.Click Create New Key and then select Android key.

5.In the resulting dialog, enter the SHA-1 fingerprint generated by the keytool, then a semicolon, then your application's package name. For example:

BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:91:AF:A1:66:6E:44:5D:75;com.example.android.mapexample

  1. The Google Developers Console responds by displaying Key for Android applications followed by a forty-character API key. For example:

    AIzaSyBdVl-cTICSwYKrZ95SuvNw7dbMuDt1KG0



来源:https://stackoverflow.com/questions/31149508/google-map-v2-doesnt-showing-after-publishing-in-play-market

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!