There are two ways to connect to development server.
Via wifi if your mobile and pc is in same network.
Via usb cable.
For num 1 go through following checklist.
Check if your machine and mobile device is connected to same wifi network.
Open the react native menu in mobile device by typing this command "adb shell input keyevent 82" (your device must be connected to your machine via usb cable when using this command).
Click the option that stated "dev server" or something like that.
Enter your machines ip address along with the port number. In my case it is 192.168.0.10:8081
Reload the application and bingo.
For number 2 you can enter this command in the terminal "adb reverse tcp:8081 tcp:8081" .That will do the rest.
if you have a virtual device after you run react-native start
open a new terminal and go to your app directory and type adb connect 127.0.0.1:62001 then type adb devices
now you should see your device
after that go to your emulator or real device and shake it(in vitual device ctrl+0) and go to dev setting and ............
There are two ways to connect to development server.
For num 1 go through following checklist.
Check if your machine and mobile device is connected to same wifi network.
Open the react native menu in mobile device by typing this command "adb shell input keyevent 82" (your device must be connected to your machine via usb cable when using this command).
Click the option that stated "dev server" or something like that.
Enter your machines ip address along with the port number. In my case it is 192.168.0.10:8081
Reload the application and bingo.
For number 2 you can enter this command in the terminal "adb reverse tcp:8081 tcp:8081" .That will do the rest.
Have the same issue witch happens after every run-android . This line from https://facebook.github.io/react-native/docs/running-on-device-android.html helps , i press reload and it works but next time -same thing
or
if you have a virtual device after you run react-native start open a new terminal and go to your app directory and type adb connect 127.0.0.1:62001 then type adb devices now you should see your device after that go to your emulator or real device and shake it(in vitual device ctrl+0) and go to dev setting and ............