Android的谷歌地图应用程序显示在地图上的灰色背景,而不是 [英] Android Google Maps application showing grey background instead of the map

查看:183
本文介绍了Android的谷歌地图应用程序显示在地图上的灰色背景,而不是的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OK,我有最奇怪的错误现在:Android应用我的工作是显示在地图上的灰色背景相反,如如下:

OK, I'm having the weirdest bug right now : the Android application I'm working on is displaying a grey background instead of the map, such as below :

这里的logcat的:

Here's the logcat :

04-25 15:08:42.082: E/Google Maps Android API(19139): Failed to load map.  Could not contact Google servers.
04-25 15:08:42.082: W/Google Maps Android API(19139): Please add <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> into AndroidManifest.xml to ensure correct behavior under poor connectivity conditions.

我不知道什么可能导致此。我只是改变了我的code的一小部分,这是完全无关的地图。除此之外,我想恢复我所做的修改,它仍然没有工作。我试图加入的logcat给我就行,改变了API密钥,重新安装谷歌播放库,删除我的应用程序的previous版本在我的平板电脑,基本上是$,我在网上看了页上$ ptty的每样东西。仍然无法正常工作。

I have NO idea what might have caused this. I only changed a small part of my code that was completely unrelated to the map. And besides, I tried reverting the changes I made, and it still didn't work. I tried adding the line the logcat gave me, changing the API key, re-installing the Google Play library, deleting the previous versions of my app on my tablet, basically pretty much everything that I read on the Internet. Still doesn't work.

如果任何人有任何的想法是什么问题是,这将是巨大的。

If anyone has any idea what the problem might be, that would be great.

推荐答案

此问题是由于当有你的密钥或问题,它在谷歌API控制台配置有问题。

This problem is caused when there is a problem with your key or a problem with it's configuration in the Google API Console.

去了这篇博客我写一篇关于如何产生的关键和整合在控制台:

Go over this blog post I wrote on how to produce the key and integrate in in the console:

谷歌地图API V2关键

如果这是没有帮助的,你可以尝试删除你的用户文件夹,编译 dubug.keystore 文件夹 在eclipe(这导致再生该键)的一些项目,并尝试重新注册。

if this is not helpful you can try to delete the dubug.keystore folder in you user folder, compile some project in eclipe (which result in regenerating this key) and try to register it again.

更新: 从您发布的新的错误,你有没有在你的manifest文件此权限:

UPDATE: From the new error you posted, do you have this permission in your manifest file:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

这篇关于Android的谷歌地图应用程序显示在地图上的灰色背景,而不是的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆