0

when I tried to run the react native project on android by command npm run android I got this error:

The android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard location (e.g. not inside the 'android' folder), consider setting project.android.sourceDir option to point to a new location.info Run CLI with --verbose flag for more details.

James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

0
  1. To resolve the issue please upgrade the react-native package.

  2. Go to the Project root.

  3. Upgrade the React native package in the Command Prompt by typing react-native upgrade

  4. Then Accept to update all the Files by typing y (Yes) in the Command Prompt.

Reference: https://github.com/facebook/react-native/issues/9312 and also use the command : npx react-native run-android

noob
  • 545
  • 6
  • 23