Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Expo/React Native in Android Device

I have an React Native app developed with Expo, while scanning the QR code works perfectly, when i try to run the app in a connected usb debug succesfully enabled android device with expo start --localhost --android it doesn't launch the app in the device, although it appears everything is ok:

Successfully ran adb reverse. Localhost URLs should work on the connected Android device.

Thanks it advance.

like image 473
Joseph Palmezano Avatar asked May 14 '26 12:05

Joseph Palmezano


1 Answers

Other answers completely miss what the OP wants.

To anyone who comes across a similar issue -

  • Try manually starting your adb server before starting Expo.

    $ adb start-server

  • Sounds obvious, but make sure USB debugging is enabled. However, on the very first run, your phone will ask to allow access from your computer. Set this to always allow access from your computer.

  • Open the Expo app (update if possible). On running the command $ expo start --localhost --android, you should see your app launch on your device.


PS: This method is good for users like me who are paranoid about their phone's battery use. Connecting via a USB is less demanding on the phone & battery, as compared to using the wifi.

like image 97
roshnet Avatar answered May 17 '26 02:05

roshnet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!