简体   繁体   中英

OsmDroid Maps is not loading in Android 10 (Online Mode)

I'm working with osmdroid map in online mode. The map is loading properly in online mode in Android 11. But in Android 10 getting below issue.

java.io.IOException: Cleartext HTTP traffic to b.tile.openstreetmap.org not permitted

Add below line in manifest file.

android:usesCleartextTraffic="true"

AndroidManifest.xml -

<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
    <uses-permission android:name="android.permission.INTERNET" />
    <application
        ...
        android:usesCleartextTraffic="true"
        ...>
        ...
    </application>
</manifest>   

For more info android:usesCleartextTraffic Doc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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