Download Manger not working in Android Pie 9.0 NetworkSecurityConfig: No Network Security Config specified, using platform default

This worked for me After Xiaomi mi A2 received software update notification today.

enter image description here

what worked for me

Add android:networkSecurityConfig="@xml/network_security_config" in application tag

<application
        android:name=".ApplicationClass"
        android:allowBackup="true"
        android:hardwareAccelerated="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:networkSecurityConfig="@xml/network_security_config"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

where network_security_config.xml

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config cleartextTrafficPermitted="true" />
</network-security-config>

Create xml under res directory and then network_security_config.xml in xml folder like in the picture below

enter image description here

This explains the issue in software

Leave a Comment