Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Solve Could not connect to development server Error in React Native

React Native runs on backhand Server which starts when we apply the react-native run-android or react-native run-ios command on our command prompt screen. This command start will build up our Gradle project and start synchronizing the whole package using JS server. So when we close the server window this Development Server Error occurs.
When you run the android project, then you will see "Could not connect to development server" error message in your android application.


The message with this error should look below :-

Error Message :
Could not connect to development server.

Try the following to fix the issue :

  • Ensure the packager server is running.
  • Ensure your device/ emulator is connected to your machine and has USB debugging enabled – run ‘adb devices’ to see a list of connected devices.
  • Ensure airplane mode is disabled.
  • If you’re on a physical device connected to the machine , run ‘adb reverse tcp:8081’ to forward request from your device.
  • If your device is on the same Wi-Fi network, Set ‘Debug server host & Port for device’ in ‘Dev settings’ to your machine IP address and the port of your local Dev server – e.g. 10.0.1.1:8081.

How to Solve Could not connect to development server Error in React Native :

Step-1 : First run the below command in terminal or command prompt
react-native run-android

Step-2 : Then run the below command in terminal.
react-native start

Thank you for reading this article, and if you have any problem, have a another better useful solution about this article, please write message in the comment section.


This post first appeared on PHP Update Data In MySQL Database, please read the originial post: here

Share the post

Solve Could not connect to development server Error in React Native

×

Subscribe to Php Update Data In Mysql Database

Get updates delivered right to your inbox!

Thank you for your subscription

×