There might happen you'll see red screen with caption "Could not connect to development server" and a list of possible ways to fix an issue.
You might not understand what these obscure help messages means. Let's figure this out.
When you run application with command
the following steps happen:
Start JS server (written on Node.js technology)
Application is built
Application is installed onto device or emulator
First step is hidden behind message "Starting JS server..." which you can see on the screenshot below.
Started Node.js server is responsible for communicating with your Android device or emulator and is listening on 8081 port. You can check this by running the following command.
netstat -ltnp | grep -w ':8081'
So, if you accidentally or by purpose kill this Node.js server listening on 8081 port you'll immediately get above red screen.
To fix this issue you should kick off the server again by running command
or by running full blown three-step process, including required step