Solution for Glide failed to load image in android pie 9.0

Solution for Glide failed to load image in android pie 9.0

Hello, I have seen that in the Android latest version 28.0 or I can say in Android Pie 9.0 when we are using Glide for image loading then nothing is loaded. Actually this thing accrued by Network security configuration. So, I have found some solution for that.


First Option:

Add a Network Security Configuration file in your project. The Network Security Configuration feature uses an XML file where you specify the settings for your app. You must include an entry in the manifest of your app to point to this file. The following code excerpt from a manifest demonstrates how to create this entry:

<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
    <application android:networkSecurityConfig="@xml/network_security_config"
                    ... >


Your network_security_config.xml:

<?xml version="1.0" encoding="utf-8"?>
        <domain includeSubdomains="true"></domain>
            <certificates src="@raw/my_ca"/>


Second Option:

The second option is simple, simply add one line in your AndroidManifest.xml




This line should be placed in your AndroidManifest.xml within the application tag, Let's see the example:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""

    <uses-permission android:name="android.permission.INTERNET" />

        <activity android:name=".MainActivity">
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />



About Glide

Glide is a fast and efficient image loading library for Android focused on smooth scrolling. Glide offers an easy to use API, a performant and extensible resource decoding pipeline and automatic resource pooling. Glide supports fetching, decoding, and displaying video stills, images, and animated GIFs. Glide includes a flexible API that allows developers to plug into almost any network stack. By default, Glide uses a custom HttpUrlConnection based stack, but also includes utility libraries plug into Google’s Volley project or Square’s OkHttp library instead.

Glide uses a simple fluent API that allows users to make most requests in a single line:



You may like:

Related posts

Write a comment