Learn how to enable HTTP cleartext traffic for .NET MAUI Android apps by setting `UsesCleartextTraffic=true` in your `MainApplication.cs` file.
In the Platforms/Android/MainApplication.cs file, add the cleartext attribute.
1
2
3
4
5
6
7
8
9
#ifDEBUG// connect to local service on the[Application(UsesCleartextTraffic = true)]// emulator's host for debugging,#else// access via http://10.0.2.2[Application]#endifpublicclassMainApplication:MauiApplication{...}