IOException downloading MapTile: /0/0/0

77 views
Skip to first unread message

Николай Казаков

unread,
Jan 24, 2020, 3:13:03 AM1/24/20
to osmdroid
I getting an error

W/OsmDroid: IOException downloading MapTile: /0/0/0 : java.net.ConnectException: Failed to connect to a.tile.openstreetmap.org/2a02:6b8:b010:5065::a001:443
only the grid is loaded. 

The error is observed on the emulator with API 28,29 
whit API 23 everything works, tiles are loaded.

this is my code:

Configuration.getInstance().setUserAgentValue(BuildConfig.APPLICATION_ID)
Configuration.getInstance().setOsmdroidBasePath(
   
File(
        getStorage
().absolutePath,
       
"osmdroid"
    )
)

Configuration.getInstance().setOsmdroidTileCache(
   
File(
        getStorage
().absolutePath,
       
"osmdroid/tiles"
    )
)

Log.d(LOGTAG, Configuration.getInstance().osmdroidTileCache.absolutePath)
Log.d(LOGTAG, StorageUtils.isWritable(File(Configuration.getInstance().osmdroidTileCache.absolutePath)).toString())
setContentView
(R.layout.activity_main)


AndroidManifest.xml

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

there is also a permission request in runtime


So you have any idea what the problem could be?
Reply all
Reply to author
Forward
0 new messages