React Native CLI failed to determine Android project configuration. This is likely due to misconfiguration. Config output:
See original GitHub issueAsk your Question
Just created a new react-native project using npx react-native init, but after initializing the project running npx react-native run-android throws the 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.
while android folder is in the root dir.
I also Tried to sync the gradle files and it throws the following error =>
java.lang.Exception: React Native CLI failed to determine Android project configuration. This is likely due to misconfiguration. Config output:
i’ve followed various approaches from setting up a react-native react-native.config file to deleting and reinstalling node modules nothing seems to work while i’m still able to run my old react-native project.
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:14
Top GitHub Comments
Edit: I hid the comment above, but this issue only happens on Windows
This might be an issue with the
glob
package; I tried this sample code that looks for the AndroidManifest.xmlWith
glob@7.2.0
, it works, but withglob@7.2.2
it fails to return anything7.2.2 was released 6 hours ago
Update:
Manually setting
options.allowWindowsEscape
tofalse
seems to fix everythingI think it’s not meant to be released in 7.2.2
Edit 3:
You can add another entry in the
resolutions
part of your package.json, so that it installs7.2.0
instead of7.2.2
There is a solution on this video… https://www.youtube.com/watch?v=AQqYPRHTTYI after some days lookink for I found it and it solved the issue.
SOLUTION - nodeModules – Glob – common.js – options.allowWindowsScape = true…. change to “false”….