Why is my react native not opening a simulator?

Viewed 4073

I'm using React Native and Linux to create a test app.

When I type npm start to the command line. I get the below message.

enter image description here

However no "simulator" or "server" pops up showing me the app.

When I click reload I get the warning message.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.

2 Answers

npm start does not open simulator, you should open you simulator and run your project (with npm run android or npm run ios) then it will run in your simulator, you also can connect your phone to pc with usb cable and run your project and it will run in your phone. you can use Android Studio to open a simulator

In case you have already opened a virtual device and after running npx react-native start you get No apps connected. Sending "reload" to all React Native apps failed. message, you need to add the ipaddress:PORT inside the debug menu of the app, you can open the menu by using Ctrl + M. The default port is 8081. After adding that simply hit R once or twice on your keyboard and now it should work as expected.

Related