Picture of hang in terminal
Just getting started with react native. I've gone through the instructions React-Native and have set up my android emulator, got all that stuff good to go.
I used npx react-native init auth to start a project where I hook up some authentication in RN.
Everything was going well until I ran the command react-native run-android and now it just keeps hanging when it gets to "Starting JS server..." and doesn't do anything.
Compile a react-native Android app without using packager:
react-native run-android --no-packager
After, start packager in another terminal session to bundle js:
react-native start
open a new tab in terminal and execute this command
react-native start
it should be starting the js server
Related
I receive these error although I followed exactly react native guidance, I launch the emulator manually then I run these command (react-native run-android) although run-ios works perfectly
I ejected an expo project and tried running npm start and npx react-native run-android. The bundler runs and shows this
To reload the app press "r"
To open developer menu press "d"
The app is installed in the emulator, but shows the following error.
unable to load script. make sure you're either running a metro
server (run 'react-native start') or that your bundle
'index.android.bundle' is packaged correctly for release.
The emulator is able to reach the host machine IP address in the browser.
I tried the following solutions.
Run npm start or react-native start in the root directory of your project before react-native run-android
android:usesCleartextTraffic="true"
Changing port
Nothing helped me. What could be the issue?
I am getting these errors ;
java.lang.RuntimeException: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
Open up a new tab in the terminal and in your project folder type react-native-start and then go back to the other tab and run your project by typing react-native run-android
By using react-native start you will see the metro bundler starting up and running. If you want to clear the metro cache then type the below in your project directory
react-native start --reset-cache
enter image description here]1
I am doing following step to start react application
react-native init reactTutorialApp
react-native run-android
by followed these steps and it is installing on Device successfully. but i am getting a following error.
The development server return response error code:500
PFA
I think you forgot to run one command, the one to start the development server.
Try:
react-native init reactTutorialApp
run the following command in the project root folder, but in another tab (this process need to be running when you're developing:
react-native start
And now you can run: react-native run-android
Tell me if it solve your problem.
I am a starter of React-native tho I am having trouble with debugging. Program is successfully installing apk to emulator but can not render the component. Whenever I double press 'R' (I am on windows) it throws following error
Try:
cd YourProject
react-native run-android
react-native start