To begin with, I was using org.apache.http functions for a while now and error came when I tried to launch my app on API 28. It\'s working on API 26 and API 23, but suddenly
Step 1: create an xml file in res/xml/network_security_config.xml and copy the below code in it,
res/xml/network_security_config.xml
your.website.domain
Step 2: now in your Manifest.xml add android:networkSecurityConfig="@xml/network_security_config" under the tag. Done!
Manifest.xml
android:networkSecurityConfig="@xml/network_security_config"