升级到SDK2.3,现在地图不显示了

发布于 2024-10-06 11:10:56 字数 1743 浏览 2 评论 0原文

我的错是不耐烦,但我刚刚在 Eclipse 3.5 上安装了 Gingerbread SDK 和新的 Eclipse ADT 插件 现在,当我运行一个在 2.2 上运行良好的现有 Google 地图项目时,我在 Eclipse 中运行时看不到地图显示,就像我有错误的调试地图 API 密钥一样。 (我只是看到灰色屏幕和左下角的 Google 徽标。)

我使用旧的 Google API [Android 2.1 update1] 构建路径,就像以前一样,并且目标 AVD 和以前一样是 Google API 级别 7。 (我还创建了一个新的 Google API 级别 7,但它也不起作用)。

向后兼容性似乎在某个地方被破坏了。 logcat 中可能唯一重要的是:

12-06 19:10:31.095: ERROR/ActivityThread(231): Failed to find provider info for com.google.settings

其中 231 是我的应用程序的 PID。

我们将不胜感激地收到所有建议

(我已经与 Google 核实,我的调试 API 密钥仍然可以)

(我尝试向这个问题添加一个 Gingerbread 标签,但没有足够的代表。也许有人想添加一个?)

对于 Octavian:

manifest.xml

<uses-sdk android:minSdkVersion="4" />

default.properties

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
# 
# This file must be checked in Version Control Systems.
# 
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.

# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
target=Google Inc.:Google APIs:7
apk-configurations=

的一部分,我从插件导入了示例 MapsDemo 项目,将我的 API 密钥粘贴到 xml 中,然后

12-06 21:55:16.722: ERROR/MapActivity(492): Couldn't get connection factory client

在 logcat 中看到:(492 是示例应用程序的 PID,我仍然只得到灰屏 - 无地图) 我想知道这是否相关?

更新

这不仅仅是地图应用程序。 每个 AVD(新创建的或预先存在的)上需要网络连接的每个应用程序都无法连接。内置浏览器无法找到 google。名为“地图”的内置应用程序出现“正在加载”,然后是“网络故障 - 此应用程序需要有效的数据连接”。

我做了什么?请建议我该如何修复它?

My fault for being impatient but I've just installed Gingerbread SDK and the new ADT plugin for Eclipse on Eclipse 3.5
Now when I run an existing Google maps project which has worked fine on 2.2, I see no map displayed when running in Eclipse, just like as if I had the wrong debug maps API key. (I just get the grey screen and the Google logo bottom left.)

I have the build path using the old Google APIs [Android 2.1 update1] just like it was before and the target AVD is Google API level 7 as before. (I also created a new Google API level 7 and that doesn't work either).

It seems that something in the backward compatibility is broken somewhere. The only thing in logcat which may be of significance is:

12-06 19:10:31.095: ERROR/ActivityThread(231): Failed to find provider info for com.google.settings

where 231 is the PID of my application.

All suggestions will be gratefully received

(I have checked with Google that my debug API key is still OK)

(I tried to add a Gingerbread tag to this question, but don't have enough rep. Perhaps someone would like to add one?)

For Octavian:

part of manifest.xml

<uses-sdk android:minSdkVersion="4" />

default.properties

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
# 
# This file must be checked in Version Control Systems.
# 
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.

# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
target=Google Inc.:Google APIs:7
apk-configurations=

I imported the sample MapsDemo project from the addon, pasted my API key in the xml and see this:

12-06 21:55:16.722: ERROR/MapActivity(492): Couldn't get connection factory client

in the logcat (492 is the PID of the sample app, I still get just the grey screen - no map)
I wonder if it's relevant?

UPDATE

It's not just the maps application. Every single application that requires network connectivity on every AVD (newly created or pre-existing) fails to connect. The built in browser can't find google. The build in app called "maps" comes up with "loading", then "Network failure - This application requires a working data connection".

What have I done? Please suggest how can I fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

水水月牙 2024-10-13 11:10:56

在我的 AVD 上完美运行。确保针对正确的平台进行测试。这意味着请确保创建 2.3 Google APIs AVD。

Works perfectly on my AVD. Make sure to test it against the correct platform. That means make sure to create a 2.3 Google APIs AVD.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文