When I run react-native run-android, it gives me the following error:
Could not connect to development server
Starting with Android 9.0 (API level 28), cleartext support is disabled by default. we can use android:usesCleartextTraffic="true" this will work but this is not recommended solution. For Permanent and recommended Solution is below:
Step 1 : create a file in android folder
app/src/debug/res/xml/network_security_config.xml
Step 2 : add this to network_security_config.xml
localhost
10.0.2.2
10.0.3.2
Step 3 : Apply the config to your AndroidManifest.xml