【问题标题】:Android Google Map V2 Authentication issueAndroid Google Map V2 身份验证问题
【发布时间】:2016-01-15 05:38:44
【问题描述】:

我正在开发 Google Map V2。我在 Google Developer Console 上创建了 API 密钥,还启用了 Google Maps Android API。将该 API 密钥集成到我的应用程序中。但是每当我在地图视图上运行应用程序时,它都会显示以下错误。

我通过 debug.keystore 创建了 SHA-1 证书指纹 我正在开发 Eclipse。

10-16 17:39:22.983:E/b(24170):服务器上的身份验证失败。 10-16 17:39:22.983:E/Google Maps Android API(24170):授权失败。请参阅https://developers.google.com/maps/documentation/android/start 了解如何正确设置地图。 10-16 17:39:22.986: E/Google Maps Android API(24170): 在 Google Developer Console (https://console.developers.google.com) 10-16 17:39:22.986:E/Google Maps Android API(24170):确保启用“Google Maps Android API v2”。 10-16 17:39:22.986:E/Google Maps Android API(24170):确保以下 Android Key 存在: 10-16 17:39:22.986:E/Google Maps Android API(24170):API 密钥:AIzaSyC2MVY7YknNfRtScZ45q7NcAADtF59IfnI 10-16 17:39:22.986: E/Google Maps Android API(24170): Android 应用程序 (;): BE:7B:1E:07:B4:F0:F9:9E:74:09:CF:01:CC :F5:DF:EA:6E:4B:0D:E2;com.example.cc

我仔细检查了 API 密钥及其创建。

谢谢

【问题讨论】:

  • 检查你在 manifest 中提到的包名和 api 密钥
  • 我刚刚再次检查了我在控制台上给出的相同
  • 可能您在 Google Developers 控制台中输入了错误的 SHA1 密钥
  • 我创建了 Project 2 3 次但同样的问题

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


【解决方案1】:
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="//place your API key here" />

如果您已完成,请检查 SHA1 密钥和包名称。您在控制台中提供的包名称和构建 gradle -> applicationId 中的包名称应该相同。确保您提供了真正的 SHA1 密钥。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-28
    • 1970-01-01
    • 1970-01-01
    • 2015-05-28
    • 2011-10-11
    相关资源
    最近更新 更多