We have a WebView in our android app that end users can browse to whatever site they want. Android Pie disabled plain HTTP by default, so we added usesClearTextTraffic=\"tru
Solution:
As I've observed the Manifest.xml
of yours, you have used the android:usesCleartextTraffic="true"
in the <activity>
tag.
As you can see in the Documentation of the activity tag, it does not offer any functionality as such in the syntax provided in the docs.
As you can see in the screenshot below, the description of the cleartexttraffic is quite straight forward.
Also, if you look at the Documentation of the application tag, you will notice that android:usesCleartextTraffic
is one of the attributes of the Application Tag
.
So the only fix required here is to remove the attribute in from the activity tag and use it in the application tag and there is no activity tag support for android:usesCleartextTraffic
.
Starting with Android 9 (Pie) Clear Text Traffic is disabled by default.
Hence, the solution would be:
<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
<uses-permission android:name="android.permission.INTERNET" />
<application
...
android:usesCleartextTraffic="true"
...>
...
</application>
</manifest>
Try it, Please comment if you have any issues related to this.