Unable to run react native project in my mobile device

Viewed 14

I am trying to run my react native app in my mobile device by following the docs. https://reactnative.dev/docs/running-on-device

I am using the command

npx react-native run-android

But it is showing me the following error:

error 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 'android' folder), consider setting project.android.sourceDir option to point to a new location. info Run CLI with --verbose flag for more details.

I am not understanding what does it mean by "android" folder? Because I already have an android folder in my project directory.

enter image description here

1 Answers

To solve this issue please try these steps:

1- Clear node_modules.

2- add this to package.json

"resolutions": { "glob": "7.2.0" }

3- Reinstall node_modules with npm install

You can check this old question from here for more details.

Related