Source path does not exist: network_security_config.xml

I am facing error for including network_security_config.xml file

In config.xml I have code like

<platform name="android">
	
    <edit-config file="app/src/main/AndroidManifest.xml" 
                 mode="merge" target="/manifest/application" 
                 xmlns:android="http://schemas.android.com/apk/res/android">
        <application android:usesCleartextTraffic="true" />
        <application android:networkSecurityConfig="@xml/network_security_config" />
    </edit-config>
	 
    <resource-file src="network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
	 
</platform>

And I have kept res folder outside the www folder as per the Volt documentation.
file present at location res\xml\network_security_config.xml still it is giving error as below.

UserError: Source path does not exist: network_security_config.xml Is your resource folder inside your www folder? See https://volt.build/docs/set_up/

I have tried modifying path of resource-file like below but no help

app/src/res/xml/network_security_config.xml
res/xml/network_security_config.xml

Let me know what changes I need to do.

The res folder is for your icons and splash screens.

If you have other resources, you can keep them in a separate res folder in your www folder.

try this:

<edit-config file="AndroidManifest.xml" 
             mode="merge" target="/*/application" >
1 Like

This worked perfectly :metal:Thank you very much

@mujaffar - which suggestion worked perfectly?

This one worked correctly