Home > front end >  OsmDroid Maps is not loading in Android 10 (Online Mode)
OsmDroid Maps is not loading in Android 10 (Online Mode)

Time:06-08

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

CodePudding user response:

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

  • Related