【问题标题】:OSMDroid offline map : exception with blank map on android device "fail to read directory on sdcard"OSMDroid 离线地图:android 设备上的空白地图异常“无法读取 sdcard 上的目录”
【发布时间】:2015-10-04 13:20:44
【问题描述】:
       MapView mapView = new MapView(this, 256); //constructor
       mapView.setClickable(true);
       mapView.setBuiltInZoomControls(true);
       setContentView(mapView); //displaying the MapView
       mapView.setTileSource(TileSourceFactory.MAPQUESTOSM);
       mapView.getController().setZoom(15); 
       mapView.getController().setCenter(new GeoPoint(mLat, mLon));
       mapView.setUseDataConnection(true); 
       mapView.setMultiTouchControls(true);

我已经使用 OSMDroid MapQuest 与 Atlas creator 制作了离线地图

我已将 zip 文件放在“osmdroid”文件夹内的 Sdcard 中。

但是

当我运行我的 android 应用程序时,会出现异常

**读取目录失败

并在我的安卓设备上显示“空白地图”

请帮忙。

【问题讨论】:

  • 您使用的是哪个安卓版本?你在 android manifest 中声明了读取权限吗?

标签: android


【解决方案1】:

如果您使用 Lollipop,则无法从 SDCard 中的任意目录读取数据。您必须执行以下操作之一:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-27
    • 1970-01-01
    相关资源
    最近更新 更多