一些工作后,我能够在片段中实例化一个MapView,我使用“标题条纹+刷卡”布局,我的目标是有一个带有列表视图的片段,第二个是地图。MapView与ActionBar布局(API lvl 11)
我读过所有的教程有新的谷歌地图API workind,拿到了钥匙和eveything应该收高,但在执行时,我得到这个错误: 找不到类“com.google .android.gms.maps.MapFragment“on path:/system/framework/come.google.android.jar:/data/app/my_package
该代码是由SDK生成的代码(代码由eclipse,选择标题条+滑动布局)加上onCreateView()方法:
View mFragmentView = inflater.inflate(R.layout.map, null);
MapView map = (MapView)mFragmentView.findViewById(R.id.map);
return map;
从th ËXML的一面,我有一个map.xml布局,仅这里面:提前
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.MapFragment"/>
感谢您的帮助
烨,我不完全成是诚实的,但: 是的,我已经下载-I添加库的项目 所以我不玩谷歌服务 真的知道可能是什么,谢谢你的链接tho – Anearion
做了你所说的一切,仍然得到同样的错误。 – Anearion
您确定将库添加到构建路径以及libs文件夹中,右键(假设您使用的是eclipse) – DiscDev