net maui net 8 uptated networkSecurityConfig not found error ?

Sami 566 Reputation points
2023-11-07T22:48:05.5133333+00:00

net maui net 8 uptated networkSecurityConfig not found error ? how to fix it ?

//AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
	<manifest xmlns:android="http://schemas.android.com/apk/res/android">
		<application android:networkSecurityConfig="@xml/network_security_config" android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
		<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
		<uses-permission android:name="android.permission.INTERNET" />
		<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
	</manifest>


//network-security-config.xml

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
	<base-config cleartextTrafficPermitted="true" />
	<domain-config cleartextTrafficPermitted="true">
		<domain includeSubdomains="true">example.domain.name</domain>
	</domain-config>
</network-security-config>
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,194 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sami 566 Reputation points
    2023-11-08T07:22:44.6633333+00:00

    The error was because of network_security_config.xml on solution explorer properties was selected none which has to be androidresource selected.

    0 comments No comments