Unable to connect android phone to my project using Expo
I created my project in response to the native CLI:
_npm install -g create-react-native-app
_create-react-native-app AwesomeProject
_cd AwesomeProject
_npm start
Then I installed expo
on my Android phone and scanned the QR code on my computer screen.
However, my phone can't connect to the project and I don't know why. It just loads and fails. This error message:
Failed to load exp: //192.168.56.1: 19000. Network timeout.
This is a view error:
"Unused error: java, not.SocketTimeoutException: Could not connect to /192.168.56.1 (port 19000) after 10000ms."
I am trying to fix this but still cannot get it to work. My phone and my laptop are on the same network. What can I do now?
source to share
Please see this issue for an answer: https://github.com/react-community/create-react-native-app/issues/60
source to share
I had a similar issue on iOS - the project showed up in the Expo app but didn't want to connect.
Here's what I did:
-
Connect PC to device via USB cable
-
Download the newest xde from: https://github.com/expo/xde/releases
-
Install XDE, create a new project from the gui (DO NOT use the old project from create-react-app as it can also show up in XDE) and click the new project (in XDE) under My Projects.
Your project should now appear in the Expo app on your phone. If it doesn't try to email your app link (to its own mailbox and open the link on your phone), mine looks like this:exp://5c-gp9.[accountname].my-new-project.exp.direct:80
source to share