Reputation: 1665
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.
Upvotes: 9
Views: 38602
Reputation: 2073
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.
Upvotes: 18
Reputation: 21
So
Quit all terminal
Check if your device is connected to the same WiFi as your computer
run npm start
from the root of your directory's app
Go to expo app on your phone and launch your app
Upvotes: -4
Reputation: 21
Are you working with expo managed workflow or bare workflow ?
In the both cases you need to check if you are connected on the same network with your device and your computer.
Sometimes just quit everything and relaunch the project after turn off/on your Wi-Fi works.
To launch your app you just need expo start
or npm start
, nothing else, if you're working with managed workflow.
Upvotes: 1