-3

I have developed one app using navigation drawer in android. I have even used an external library for spin wheel event. The whole app works on web API. The app is compatible on all versions but getting crash on Pie version. In gradle i have mentioned targetsdkversion:28 but still not working on Pie version.Please help me out App Gradle

Zoe
  • 27,060
  • 21
  • 118
  • 148

2 Answers2

0

When an app communicates with servers using a cleartext network traffic, such as HTTP, it could raise the risk of eavesdropping and tampering of content. Third parties can inject unauthorized data or leak information about the users. That is why developers are encouraged to secure traffic only, such as HTTPS.

Try this Solution: https://stackoverflow.com/a/54918763/6676310

VIISHRUT MAVANII
  • 11,410
  • 7
  • 34
  • 49
0

I Recently had the same issue for Android 9, but I had to use some URLs for different screens. So I added android:usesCleartextTraffic="true" to Manifest and it worked, but we didn't want to compromise the security of the whole app for this. So the fix was in changing links from HTTP to https.But if you had to use only http to communicate with your app then here is your solution.

Use in Manifest application tag

android:networkSecurityConfig="@xml/security_config"

And create a xml file like this.

<network-security-config>
<base-config cleartextTrafficPermitted="true"/>
<debug-overrides>
    <trust-anchors>
        <certificates src="system" />
        <certificates src="user" />
    </trust-anchors>
</debug-overrides>

Brahma Datta
  • 1,102
  • 1
  • 12
  • 20