I am trying to open my react-native app on an emulator, but I am continuously facing the red screen error after the initial load.
Here are few of my observations --
When I run
react-native run-android
from my project root directory, the adb is running on port 8081. Refer the screenshot.When the app first launches, it shows the default screen properly. Refer screenshot below.
Although it asks to edit the index.android.js, I had already added code in that file. I am not sure why it is not loading the screen on the first load. Refer screenshot below.
When I reload this screen by double tapping 'R' on my keyboard, I see the red-screen error saying that the development server could not be connected.
- I changed the default port 8081 to some other port number in the file
server.js
and gave the same port number and my machine's IP address in Developer Menu on the device.
After doing all the above steps, still I am getting the red-screen error that development server could not be connected. I am sure I am missing some silly thing, which I need to connect these dots and make the app running. Please help me. Thanks in advance!
EDIT 1:
After running react-native start
, system gets stuck at this step and nothing happens.