DEV Community

Kashif Raza
Kashif Raza

Posted on

1

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)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay