- 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 react@16.8.3
in Windows OS. - Change current directory to your project's directory.
- Run
yarn add react
command. - Run
rm -rf ios android
command for deleting the existing ios and android folder. - Run
react-native eject
command. - Run your android emulator.
- Run
adb devices -l
command. Ensure that your emulator appears on the list, usually named asemulator-5554
and no unauthorized status appear. - Run
react-native run-android
command. Confirm that the app is built and then running on your emulator with no error.