Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to connect Android phone to my project with Expo

I created my project in react native by CLI:

_npm install -g create-react-native-app
_create-react-native-app AwesomeProject
_cd AwesomeProject
_npm start

Then I installed expo in my Android phone, and scanned a QR code on my computer screen.

However, my phone can't connect to project, and I don't know why. It just loads and fails. This is error message:

Could not load exp:// 192.168.56.1:19000. Network response timed out.

This is view error:

"Uncaught Error: java,not.SocketTimeoutException: faild to connect to/192.168.56.1 (port 19000) after 10000 ms.

I'm trying to fix it, but still can't get it working. My phone and my laptop are on the same network. What can I do now?

like image 917
tiến dũng nguyễn Avatar asked Aug 08 '17 03:08

tiến dũng nguyễn


People also ask

How do I connect my Android phone to Expo?

Download Expo Go from the Apple App Store or from the Google Play Store. On your iPhone or iPad, open the default Apple "Camera" app and scan the QR code you see in the terminal. On your Android device, press "Scan QR Code" on the "Home" tab of the Expo Go app and scan the QR code you see in the terminal.

Do you need Android Studio for EXPO?

No Xcode, No Android StudioWith Expo, there is no need to ever worry about these tools, since you would never need them.

How do I get expo for Android emulator?

Download and install Android Studio 3.0+. Select "Standard" for the "Install Type" inside the wizard. Inside Android Studio, go to Preferences > Appearance & Behavior > System Settings > Android SDK. Click on the "SDK Tools" tab and make sure you have at least one version of the "Android SDK Build-Tools" installed.


1 Answers

Select LOCAL instead of LAN.

screenshot

I kicked myself when I fixed this.

like image 151
Daniel Joseph Kibby Avatar answered Oct 13 '22 08:10

Daniel Joseph Kibby