我无法获得“Google APIs by Google Inc, Android API8, revision 2”附带的 MapsDemo去工作

发布于 2024-09-30 20:51:02 字数 397 浏览 1 评论 0原文

我已按照说明尝试了一切,以使 MapsDemo 在 API8 上运行。我遵循了所有证书签名说明,但我得到的只是模拟器上的空白(蓝色)屏幕。我看到人们也遇到了同样的问题,但所有建议的解决方案都归结为证书签名,但这对我不起作用。互联网上的一个人甚至说他可以让它工作,但从未说如何!

所以,我想尝试一下“Google APIs by Google Inc, Android API7, revision 1”附带的 MapsDemo。在那里,我看到地图出现在模拟器上,但只出现了一次。有一次它清晰地出现,我能够平移它,但退出应用程序并再次尝试后,它不再起作用。现在我得到的只是一些模糊的轮廓,使它看起来像是在尝试工作,但由于某种原因没有成功。

我正在 Windows Vista Service Pack 2 上运行并使用 Eclipse Helios。

I have tried everything according to instructions to get the MapsDemo to work on API8. I followed all the certificate signing instructions and all I get is a blank (blue) screen on the emulator. I see that people have been having the same issues but all the suggested solutions boil down to the certificate signing and that has not worked for me. One guy on the Internet even said he got it to work but never said how!

So, I thought I'd try the MapsDemo that comes with "Google APIs by Google Inc, Android API7, revision 1". There I saw the map come up on the emulator but only once. That one time it came up clearly and I was able to pan it but after exiting the app and trying it again, it no longer worked. Now all I get is some faint outlines that makes it look like it's trying to work but for some reason is not successful.

I am running on Windows Vista Service Pack 2 and using Eclipse Helios.

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

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

发布评论

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

评论(1

往日情怀 2024-10-07 20:51:02

我怀疑它正在工作,但你“放大”了海洋 - 因此出现蓝屏。不幸的是,MapsDemo 默认情况下没有启用缩放小部件,因此很难看到。尝试添加缩放小部件,如下所示,然后缩小到更高的高度。注意,该小部件仅在您平移地图时才会出现(即添加此代码后,在地图上拖动以使小部件出现)。

提供地图视图和 ID,以便您可以在代码中访问它 - 即在 res/layout/mapview.xml 中:

 <com.google.android.maps.MapView
    android:id="@+id/mapview"

在代码中启用缩放小部件 - 即在 src/com.example.android.apis/view/MapViewDemo.java 中:

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.mapview);
    MapView mapView = (MapView) findViewById(R.id.mapview);
    mapView.setBuiltInZoomControls(true);
}

I suspect that it is working but that you are "zoomed in" over the ocean - hence the blue screen. Unfortunately the MapsDemo doesn't have the zoom widget enabled by default so this is hard to see. Try add the zoom widget, as follows, and then zoom out to a higher altitude. NB the widget only appears when you pan the map (ie drag on the map to make the widget appear, after adding this code).

Give the mapview and ID so you can access it in code - ie in res/layout/mapview.xml:

 <com.google.android.maps.MapView
    android:id="@+id/mapview"

Enable the zoom widget in code - ie in src/com.example.android.apis/view/MapViewDemo.java:

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.mapview);
    MapView mapView = (MapView) findViewById(R.id.mapview);
    mapView.setBuiltInZoomControls(true);
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文