I am developing an app with volley library. Everything is working fine below android 9.0. But not in 9.0
I am using
implementation 'com.android.volley:volley:1.1.0'
targetSdkVersion 28
compileSdkVersion 28
minSdkVersion 24
gradle:3.2.1
From android 9 clear text traffic is prohibited. You will manually need to allow it adding below code to manifest.
android:networkSecurityConfig="@xml/network_security_config"
Also, create xml/network_security_config.xml and add below code to allow clear text traffic:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>
Update :
Please add below line in manifests:
android:usesCleartextTraffic="true"
First, You check your Offline
mode is check or Unchecked. if it's check then please go on setting and Unchecked.
Now change the below version :
compileSdkVersion 27
minSdkVersion 16
targetSdkVersion 27
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.volley:volley:1.1.0'
Now Clean
and Re-Build
your Project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With