Taking a second look, I notice that you mention that there is a QR code and that your URL is exp://192.168...
, that means you are using create-react-native-app
(or Expo) and (possibly) are attempting to scan it in the Expo app to open your app for development (or simply running yarn run android
). This will not work without internet access as it leverages the Expo servers as an intermediary for building/bundling parts of the code.
If you are willing to forgo create-react-native-app/Expo, you can create your project using react-native init <projectname>
and get a working development environment without internet access using the third method I mentioned in the comments.
Note: I suspect that the first two methods that I suggested will work as well, but I could only verify the third at the moment and only with macOS + Android as I currently do not have access to a Windows machine.
Given that you:
- create the project using
react-native init
- have no internet access on your computer
- have no use for the wifi on both the computer and your Android phone
- have your USB cable for connecting your phone to your computer
You can do the following:
- enable a wifi hotspot with your Android phone
- connect to it with your computer like any other wifi network
- connect your phone to the computer via USB for debugging
- run your project with
react-native run-android
I've tested this with macOS + Android with React Native 0.47.2 and it works fine.