To add to goldylucks
's answer, you can use IP 192.168.0.10 if that is the IP of your PC running the React Native packager.
You may need to open your firewall as well.
In Ubuntu 18.04, you can get your IP by:
ip -c addr show
You will see your IP in there, something like: inet 192.168.0.10/24 brd 192.168.0.255 scope global dynamic noprefixroute enp0s25
(notice the 192.168.0.10 in my sample).
Then, you could open port 8081 in your firewall, something like:
sudo ufw allow 8081
It will be using TCP, so make sure TCP is open on port 8081.
Then you can follow goldylucks's answer and goto Dev settings
and enter 192.168.0.10:8081
or whatever IP you need.
You can test it from the browser on your device. While the packager is running from your PC, navigate to http://192.168.0.10:8081
from your mobile device and make sure it works. It will show something like "Packager running". It will be clearly working or failing.
Goldylock's answer excites me because it solves the issue very nicely if you are having problems with that error messages. It sucks to have to rebuild the app all the time or worse yet, delete the APK off your device and then build again.
As such, you should probably be using wifi as part of your dev strategy.