OsmDroid - OSMBonusPack - GenericMapView 无法解析为类型

OsmDroid - OSMBonusPack - GenericMapView cannot be resolved to a type

我更新自: 'osmdroid-android-4.3 + osmbonuspack_v5.1' 到 'osmdroid-android-5.1 + [=36= .7'

我还导入了'osmdroid-third-party-5.1.jar'

然后我查看了OsmNavigator的源代码,发现mapView的创建方式与旧版本的OsmDroid不一样:

//map = (MapView) findViewById(R.id.map);
    GenericMapView genericMap = (GenericMapView) findViewById(R.id.map);
    MapTileProviderBasic bitmapProvider = new MapTileProviderBasic(getApplicationContext());
    genericMap.setTileProvider(bitmapProvider);
    map = genericMap.getMapView();

错误:GenericMapView 无法解析为类型

我做不到:import org.osmdroid.bonuspack.mapsforge.GenericMapView;

问题:在哪里可以找到包裹:org.osmdroid.bonuspack.mapsforge.GenericMapView;?

在osmbonuspack/MapsForgeForOsmdroid

如果您将 OSMBonusPack 包含在 Gradle 和 Jitpack 中,请添加:

dependencies {
        ...
        compile 'com.github.MKergall.osmbonuspack:MapsForgeForOsmdroid:v5.7'
}