When I run react-native run-android
, it gives me the following error:
Could not connect to development server
If you are trying to debug app in your physical android device over wifi using a windows machine, then the device may not be able to access the port of your pc or laptop, you have to make the port accessible. this involves two steps:
First create a rule in firewall. for doing this follow the following steps:
wf.msc
8081
(default) you have to make your pc accessible to outside, for doing this follow the following steps:
You are good to go, now try running react-native run-android.