CORS on device (build version)

Finally got a solution from this

Have to add android:usesCleartextTraffic="true" on android/app/src/main/AndroidManifest.xml

image

Also create android/app/src/main/res/xml/network_security_config.xml and added

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">localhost</domain>
        <domain includeSubdomains="true"><api IP Address></domain>
    </domain-config>
</network-security-config>

But dont know which one works,