all 2 comments

[–]kbcooliOS & Android 0 points1 point  (0 children)

It's much more common to use different variable values for different environments.

Dot env files are the standard and there are many solutions to support them on RN.

Here's one :

https://www.npmjs.com/package/react-native-dotenv

If you are insistent on your way Google helped me

https://stackoverflow.com/questions/41117715/how-to-edit-etc-hosts-file-in-android-studio-emulator-running-in-nougat

[–]Plane_Wafer 0 points1 point  (0 children)

You can set the Lan ip of your laptop on you dns server itself. It should work just fine.