将android-maps-extensions更新为更新版本后出现问题

时间:2014-01-22 22:20:54

标签: android android-maps-v2 android-maps-extensions

我在我的一个项目中使用了旧版本的库。但是,今天当我更新到最新版本时,我意识到它的包名等已经改变(主要版本从1.x.x切换到2.x.x)。

pl.mg6.android.maps.extensions.SupportMapFragment 现在 com.androidmapsextensions.SupportMapFragment

我进行了必要的导入更改。但是,我之前运行良好的代码中的以下行现在显示错误:

map = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getExtendedMap();

地图的类型为GoogleMap(com.androidmapsextensions.GoogleMap)。

这是我的XML中的地图

<fragment
    android:id="@+id/map"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    class="com.androidmapsextensions.SupportMapFragment" />

正如您所看到的,我已经将pl6中的XML更改为新的包名称。

我做错了什么?

0 个答案:

没有答案