skip to Main Content

After Running

npx react-native run-android

command successfully run on my machine android application also install on my mobile app and the metro server started but not loading anything. after manually pressing ctrl + R showing a message like the one below. I have attached a screenshot for your reference.

warn No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB.

enter image description here
enter image description here

2

Answers


  1. First make sure your metro bundle is running on 8081 port.

    yarn start –port 8081

    adb reverse tcp:8081 tcp:8081

    Try this above 2 commands, I hope this will help you out!

    Login or Signup to reply.
  2. You need to allow your phone/simulator to talk to Metro Bundler.

    There is a command line tool called ‘adb’. You need to install that into your local terminal. Then do yourself a favor and add it to your $PATH so you can call adb from anywhere. In my case I use zsh so I edited my ~/.zshrc file (your file might be ~/.bash_profile or other).

    export PATH=$PATH:/Users/{my_user_directory}/Library/Android/sdk/platform-tools/

    Then source the file: source ~/.zshrc

    Now run in your terminal: adb reverse tcp:8081 tcp:8081

    I usually run this right after I start up the simulator but before my app actually loads up.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search