0

I have an issue while debug my app which is build by react native. Whenever i started to build, it gives me error that could not connect to development server. I have tried several advice from https://facebook.github.io/react-native/docs/running-on-device-android.html, React Native 'hello world' quick start: "could not connect to development server", why my device (mi4i lollipop 5.02) always gives me an error that 'could not connect to development server' ? any answer would be helpful and appreciated

Community
  • 1
  • 1

2 Answers2

1

Thank you so much guys, finally found the solution, the solution is run adb reverse tcp:8081 tcp:8081 after hit command react-native start, this is really painful to read those official documentation, i've found this solution by watch this tutorial https://www.youtube.com/watch?v=v3cJwBh5e10

0

I assume the build is completed and the error in displayed in your device.

If you are in debug mode, the assets are not bundled in the app and are downloaded from your computer (react native packager) every time. This error happens when the device cannot find the react native packager.

You can shake the device to open the developer menu. From there you have to set the react native packager url. This is usually your local IP address with the port 8081. Example: 192.168.1.10:8081

Saleel
  • 889
  • 5
  • 10