Async Task Not Supporting In Android 9.0 (pie)
Solution 1:
I was also facing the same issue but After Adding the below code in my manifest file the issue got resolved
for reference you can also check this url: https://developer.android.com/about/versions/pie/android-9.0-changes-28
manifest.xml
<application...android:usesCleartextTraffic="true"...><uses-libraryandroid:name="org.apache.http.legacy"android:required="false"/></application>
Solution 2:
How to update the existing project in androidx.
does not need to add the extra permission & code, dependencies,...
0.1): changes into the compileSdkVersion 29
0.2): Refactor-> Migrate to androidX then
Just add the following code in the project "ASDF":
1): add the XML directory,
1.1): Add the following code in XML, Code is below: i.e.
<application<?xml version="1.0" encoding="utf-8"?>
<network-security-config><base-configcleartextTrafficPermitted="true"><trust-anchors><certificatessrc="system"/></trust-anchors></base-config></network-security-config>
>
2): add the following code in the in manifest file:
2.1): within application tag the (manifest->application) add the following code:
android:networkSecurityConfig="@xml/network_security_config"
2.2): outside application tag the (manifest->application) add the following code:
<application><uses-libraryandroid:name="org.apache.http.legacy"android:required="false"/></application>
be happy and share your feedback with me Thank you**
Post a Comment for "Async Task Not Supporting In Android 9.0 (pie)"