Solved
After changes of API version 9.0 getting the error Cleartext HTTP traffic to YOUR-API.DOMAIN.COM not permitted (targetSdkVersion="28"). in xamarin, xamarin.android and android studio.
Two steps to solve this error in xamarin, xamarin.android and android studio.
Step 1
Create file resources/xml/network_security_config.xml.
In network_security_config.xml,
- <?xml version="1.0" encoding="utf-8" ?>
- <network-security-config>
- <domain-config cleartextTrafficPermitted="true">
- <domain includeSubdomains="true">your.api.domain.com</domain>
- </domain-config>
- </network-security-config>
Step 2 - update AndroidManifest.xml
Add android:networkSecurityConfig="@xml/network_security_config" on application tag.
e.g,
- <application android:label="your App Name" android:icon="@drawable/icon" android:networkSecurityConfig="@xml/network_security_config">
Happy Coding :-))