I am just getting started in react native and followed all the steps given in https://reactnative.dev/docs/environment-setup for Windows -> Android .
And I have started the app using npm start after that I have tried to run the app in emulator with the command,
npm run android
and my package.json looks like,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
After entering the above command, I am getting the following error as connection refused,
Could you please kindly help how can I fix this issue and run the app successfully in the emulator?
1 Answer 1
1]set environment variable like this
if you don't know this see this video
2] cmd for run emulator in you project
emulator -avd avd <---avd is my emulator name
3] run your project using this cmd for android
react-native run-android
hope this will help you!!
Comments
Explore related questions
See similar questions with these tags.