没有 MapActivity 的 MapView [英] MapView without MapActivity

查看:33
本文介绍了没有 MapActivity 的 MapView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写这个 android 应用程序,其中有许多扩展 Activity 类的活动.我还需要一个使用 MapView 在屏幕上显示地图和 ListView 的活动(类似于使用地图上的图钉显示房屋的出租房屋列表)因为我有一个扩展 Activity 类的基类,所有其他活动扩展了该基类.只有具有地图的特定屏幕需要扩展 MapActivity 类.当我尝试这样做时,我会抛出一个 IllegalAccessError 异常.

I am writing this android application where in I have many activities that extend the Activity class. I also need an activity that uses MapView to show the Map along with a ListView in the screen (similar to rental house list where the houses are shown using pins on the map) Since I have a base class which extends the Activity class, all the other activities extend that base class. Only that particular screen which has the map needs to extend the MapActivity class. When I try doing that I am thrown a IllegalAccessError Exception.

项目设置 -Android 2.1-update1 和 GoogleAPI 2.1-update 1 都抛出相同的异常.该应用程序适用于平板电脑.

Project setup - Android 2.1-update1 and GoogleAPI 2.1-update 1 both throw the same exception. The application is for a tablet.

我已确保在 Manifest 中有该条目.

I have made sure that I have the entry in the Manifest.

任何帮助将不胜感激.

推荐答案

Google Maps API v2 终于来了.

Finally here comes the Google Maps API v2.

https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/MapFragment

他们听到了我们的声音!:)

They have heard us! :)

这篇关于没有 MapActivity 的 MapView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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