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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With