Can't connect my Android Phone in Expo React Native Project

11,521

Solution 1

First off make sure to turn off all of your anti-virus software including anything that has firewall protection. You have to do this on both your computer and your phone. It can be kind of a pain in the butt

Then try using the "Tunnel" connection for the type of connection. I had the same problem and that's how I finally got it to work on my phone.

Solution 2

Steps I followed that solved my issue

  1. Restarted Router.
  2. Clear Expo Go data from settings
  3. Run expo start and everything working good now

Solution 3

If you're using Windows, make sure the network you are using is configured as a Private network. If it's set as a Public network, you will not be able to connect.

Share:
11,521
Liza Catherine Ombyaw
Author by

Liza Catherine Ombyaw

Updated on July 28, 2022

Comments

  • Liza Catherine Ombyaw
    Liza Catherine Ombyaw almost 2 years

    I'm using Expo App in my Android Device to connect into the my Laptop's Expo (Signed in both my same Expo's Account)I am also connected in the same network. Then I scanned my code then after that it is unable to connect it. This is the error:

    Uncaught Error:java.net.ConnectException: Failed to connect to localhost/178.0.0.1:190000

    There is also an eror that I get in my Expo's Laptop:

    enter image description here

    Sometimes the URL is not the same. It should be same, right? How do I solve this. Thank you in advance!

  • Hans
    Hans over 3 years
    Thanks ! 1 year later and "Tunnel" advice worked for me !
  • Amzad Khan
    Amzad Khan over 2 years
    "Tunnel" connection also helped me but how you will get that from Expo, that screenshot I have attached in the following url: ibb.co/3fj2FMN
  • chai86
    chai86 about 2 years
    The tunnel actually worked!! Thanks.