DEV Community

Kashif Raza
Kashif Raza

Posted on

Could not connect to development server on android emulator and on real device

Have the same problem only on real android device.
Solution:

Add file android/app/src/main/res/xml/network_security_config.xml
<?xml version="1.0" encoding="utf-8"?>


localhost


Add line to android/app/src/main/AndroidManifest.xml
<application
...
android:networkSecurityConfig="@xml/network_security_config"
...

Top comments (0)