Andr谩s T贸th‘s professional blog
banditoth.net

Hey there 馃憢, I’m banditoth a .NET MAUI developer from Hungary.
I write about software development with .NET technologies.

You can find me on:
LinkedIn | Github | StackOverflow | X / Twitter | Threads

[Xamarin.Android]: Cleartext HTTP traffic to not permitted

This content has 4 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.

If your Android application gives the following error, when trying to use a HttpClient:

Java.IO.IOException: 'Cleartext HTTP traffic to 192.168.0.10 not permitted'

Set usesClearTraffic property to true in the AndroidManifest.xml:

<application android:label="MobileSolution.Android" 
	     android:theme="@style/MainTheme"
             android:usesCleartextTraffic="true">
		
</application>

The restriction was introduced in Android 8. More explanation: https://koz.io/android-m-and-the-war-on-cleartext-traffic/

One response to “[Xamarin.Android]: Cleartext HTTP traffic to not permitted”

  1. AkramAlQaifi Avatar
    AkramAlQaifi

    this helps me
    thank you

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.