Skip to content Skip to sidebar Skip to footer

Webview Shows Net::err_cleartext_not_permitted On Https Url

I'm trying to load an url that fit security protocols with HTTPS, but when I'm trying to load on a WebView, android shows me net::ERR_CLEARTEXT_NOT_PERMITTED. Why? is a HTTPS what

Solution 1:

Are you sure the URL you give to your webview is in HTTPS ?

Otherwise a quickfix would be to add the below line in your application as shown below:

<applicationandroid:usesCleartextTraffic="true"android:networkSecurityConfig="@xml/network_security_config"....
</application>

I strongly advise that you create the network_security_config to only allow your domain and subdomain. Here is a quick tutorial

Post a Comment for "Webview Shows Net::err_cleartext_not_permitted On Https Url"