I recently updated my phone to Android 9.0. The app which I was developing was working fine in earlier Android version. But after the update some views which require internet are not loading. Blank spaces are being displayed in their places.

It has a ViewPager as banner and 2 RecyclerView below categories and deals respectively. They all require internet to load data.
I don't know know if any extra permissions or dependencies are required in Android Pie.
The logs show
NetworkDispatcher.run: Unhandled exception java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
Try these solutions
Add this line in application tag in
manifestfilelike below
Add this tag in application tag in
manifestfileAdd
android:networkSecurityConfig="@xml/network_security_config"in application tagwhere
network_security_config.xmlCreate xml under res directory and then n
etwork_security_config.xmlinxmlfolderFor more info
https://developer.android.com/about/versions/pie/android-9.0-changes-28
Download Manger not working in Android Pie 9.0 (Xiaomi mi A2)