【问题标题】:Google Map is asking for API V2 and not showing Map after adding places Api Android谷歌地图要求 API V2 并且在添加地点 Api Android 后不显示地图
【发布时间】:2017-07-20 20:00:14
【问题描述】:

我面临一个奇怪的情况,我的应用程序处于生产模式,最近我添加了 google API 的功能,用于查找地点并将它们映射到地图上。我正在使用不同的 Web API 来调用返回 json 数据的地方。 API 是这样的 -

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location="lat","lon"&radius=&type=atm&keyword=&key=AIzaSyEXampleApi";

我正在为没有 googlemap.xml 内容的地图使用片段,我刚刚在清单文件中添加了 API 密钥,之前它工作正常。

<meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="api_key" /> 

当我通过 android studio 运行它时,当我通过 Playstore 发布地图时,它现在很好了。地图既没有显示,也没有地方的自动建议工作。我已经检查了 sha1 将它放在谷歌控制台上。

错误显示 - Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.07-21 01:50:04.771 25734-26650/? E/Google Maps Android API: In the Google Developer Console (https://console.developers.google.com)Ensure that the "Google Maps Android API v2" is enabled.Ensure that the following Android Key exists:API Key:AIzaSyCB-------Sample----Android Application (&lt;cert_fingerprint&gt;;&lt;package_name&gt;):

【问题讨论】:

    标签: android api google-maps google-maps-android-api-2


    【解决方案1】:

    您需要向您的 Google Developer Console 提供发布密钥的 SHA1 指纹(就像您为调试密钥所做的那样)。查看此链接,了解如何从发布密钥中获取 SHA1 指纹:https://developers.google.com/maps/documentation/android-api/signup#release-cert

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-01-15
      • 2014-07-07
      • 1970-01-01
      • 1970-01-01
      • 2013-04-16
      • 2011-03-25
      相关资源
      最近更新 更多