- Ensure that you have installed latest version of Android Studio and also setup required environment variables as well.
- Ensure that you have installed latest version of react-native-cli
- Run
react-native init <yourprojectname>command for creatint a new React Native project. Most likely, you will get this errorError: Command failed: yarn add [email protected]in Windows OS. - Change current directory to your project's directory.
- Run
yarn add reactcommand. - Run
rm -rf ios androidcommand for deleting the existing ios and android folder. - Run
react-native ejectcommand. - Run your android emulator.
- Run
adb devices -lcommand. Ensure that your emulator appears on the list, usually named asemulator-5554and no unauthorized status appear. - Run
react-native run-androidcommand. Confirm that the app is built and then running on your emulator with no error.