我想在openstreetmap 中查看地图。我添加了 osmdroid-android-3.0.8 和 slf4j-android-1.5.8 并授予以下权限...
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
我的代码…………
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mapview=(MapView) findViewById(R.id.mapview);
mapview.setTileSource(TileSourceFactory.MAPNIK);
mapview.setBuiltInZoomControls(true);
mapcontroller=mapview.getController();
mapcontroller.setZoom(13);
GeoPoint gp=new GeoPoint(51500000, -150000);
mapcontroller.setCenter(gp);
}
但我得到空地图并在 LogCat 中得到一个错误......
下载 MapTile 时出错。java.lang.SequrityException: ConnectivityService: 用户 10034 和当前进程都没有 android.permission.ACCESS_NETWORK_...
我该如何解决?