简体   繁体   English

OSMDroid离线地图:Android设备上空白地图的异常“无法读取SD卡上的目录”

[英]OSMDroid offline map : exception with blank map on android device “fail to read directory on sdcard”

       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);

I have made an offline map with Atlas creator using OSMDroid MapQuest 我已经使用OSMDroid MapQuest与Atlas Creator制作了离线地图

I have placed zip file inside Sdcard inside "osmdroid" folder. 我已经将zip文件放在“ osmdroid”文件夹内的Sdcard中。

But

When i run my android application there is excetion that 当我运行我的android应用程序时,会感到兴奋

**fail to read directory **无法读取目录

and showing "blank map" on my android device 并在我的Android设备上显示“空白地图”

Please please help. 请帮忙。

If you're using Lollipop, you cannot read from any arbitrary directory from the SDCard. 如果您使用的是Lollipop,则无法从SDCard的任何目录中读取。 You have to do one of these: 您必须执行以下操作之一:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM