La aplicación React Native (Android) no funciona en ningún dispositivo (dispositivo móvil y emulador). Siempre veo errores de solicitud de red. Así que agregué el archivo network_security_config.xml al contenedor xml, pero aún no funciona. La URL de backend es 'https://prvmsg.com'. He estado lidiando con este problema durante una semana. Por favor, ayúdenme.
---red-seguridad-config.xml---
enter code here <?xml version="1.0" encoding="utf-8"?> <network-security-config> <domain-config> <!-- Localhost config is NEEDED from react-native for the bundling to work --> <domain-config cleartextTrafficPermitted="true"> <domain includeSubdomains="true">127.0.0.1</domain> <domain includeSubdomains="true">10.0.0.1</domain> <domain includeSubdomains="true">localhost</domain> </domain-config> <domain includeSubdomains="true">newbiefans.com</domain> <trust-anchors> <certificates src="@raw/ca"/> <certificates src="system"/> </trust-anchors> </domain-config> </network-security-config>Si está utilizando HTTP, entonces debe usar
Agregar uso usesCleartextTraffic=”true” en AndroidManifest.xml