Running React Native Android on device

Solution 1

  • Run npm run start in one console window to start the react-native development server.
  • Then open a separate console window to run react-native run-android.

I sometimes ran into problems if I don't start the development server in a separate console window.

Further notes:

  • Make sure that your device is shown if you run $ adb devices in your console.
  • Note that adb reverse tcp:8081 tcp:8081 only works for Android versions 5.0 and up.

Solution 2

Could you provide us the screenshot of React Packager - run 'npm start' before doing 'react-native run-android'.

I am using Visual Studio Code with React Native tools extension that takes care of port forwarding, deploying the app to device/emulator and it works okay - I get similar screen at start, but clicking 'Reload' takes care of it.

Solution 3

I was stuck at this exact step and finally I checked my firewall and lo and behold it was blocking the connection from my device to my computer. I unblocked it and after a reload everything worked.

Share:
Admin
Author by

Admin

Updated on June 06, 2022

Comments

  • Admin
    Admin 2 months

Related