Note: this is a followup question. I'm trying to allow http traffic in the android manifest of a react native application.
As explained here, I created a xml file:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">192.168.1.61</domain>
</domain-config>
</network-security-config>
and referenced it in the manifest, in the element :
android:networkSecurityConfig="@xml/network_security_config"
At compile time, I have the following error:
Manifest merger failed : Attribute application@networkSecurityConfig value=(@xml/react_native_config) from AndroidManifest.xml:17:7-67 is also present at AndroidManifest.xml:17:7-67 value=(@xml/network_security_config). Suggestion: add 'tools:replace="android:networkSecurityConfig"' to element at AndroidManifest.xml:7:5-138 to override.
I tried the suggested workaround but the error is still here.
What is the correct way to achieve what I want?