【发布时间】:2013-09-25 05:20:24
【问题描述】:
我在我的应用中添加了“Google Maps Android API v2”的使用。在平板电脑 Google Nexus 7 上进行测试。当应用程序在设备的帐户所有者下运行时,一切正常。但是如果我创建一个新帐户,进入它并运行应用程序,则不会显示地图。有没有人遇到过这个问题?怎么办?
附:对不起我的英语
编辑 日志中的异常
09-25 11:49:34.169: ERROR/Google Maps Android API(31316): Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
09-25 11:49:34.169: ERROR/Google Maps Android API(31316): Ensure that the following correspond to what is in the API Console: Package Name: ru.cmlt, API Key: *my api key*, Certificate Fingerprint: *my certificate fingerprint*
09-25 11:49:34.169: INFO/Google Maps Android API(31316): Failed to contact Google servers. Another attempt will be made when connectivity is established.
09-25 11:49:49.339: ERROR/Google Maps Android API(31316): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
我尝试重新生成 API 密钥,但没有帮助。互联网连接处于活动状态,并且已安装 Google Play 服务应用
EDIT2 如果应用程序安装在管理员帐户中,则在其他帐户中的应用程序可以正常工作。但如果应用仅安装在额外的帐户地图中,则无法正常工作。
【问题讨论】:
-
这不应该发生,我会说它与您的 API 密钥有关,您是否为您的应用程序生成了 2 个密钥(调试密钥和发布密钥)
-
您在使用不同帐户登录时是否遇到任何异常?如果是,请在此处发布
-
一个愚蠢的错误是当我尝试调试我的应用程序时,如果没有互联网连接,我没有给自己留下任何消息。所以我的设备没有连接到互联网,但我没有注意到,地图是空白的。我花了半个小时才注意到这一点。所以我认为这不是身份验证问题,而是网络问题,请确保您已连接到互联网。
-
好吧,最后一行指出了这一点-->这可能是身份验证问题(但可能是由于网络错误)。
-
互联网绝对可用。除了地图页面还有文字和图片,一般都是从网上下载的。
标签: android google-maps android-fragments google-maps-android-api-2