react-native: Android project not found
Description
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.
Version
0.68.2
Output of npx react-native info
System: OS: Windows 10 10.0.19042 CPU: (6) x64 Intel® Core™ i5-8400 CPU @ 2.80GHz Memory: 6.21 GB / 15.88 GB Binaries: Node: 14.19.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.15 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.16 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Version 3.4.0.0 AI-183.6156.11.34.5522156 Visual Studio: 17.1.32319.34 (Visual Studio Community 2022) Languages: Java: 1.8.0_312 - C:\Program Files\OpenJDK\openjdk-8u312-b07\bin\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
bug
Snack, code example, screenshot, or link to a repository
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 80
Hello everyone. I check this https://github.com/react-native-community/cli/issues/1608#issuecomment-1126581017 and solved with:
"resolutions": { "glob": "7.2.0" }
npm install
And you may vote this result on stackoverflow https://stackoverflow.com/questions/72239857/react-native-android-project-not-found/72241166#72241166
If this is not work please install glob with
npm i glob@7.2.0
Mark Zuckerberg’s birthday today, maybe tomorrow he’ll fix this problem ✌️
My life is ruined
delete node_modules
npm i glob@7.2.0
npm install
npm run android
solved for me
@AsuKaur Try:
npm i glob@7.2.0
This worked for me. thanks a milion.
Maybe😁
delete also package-lock.json file
Perfect! Thanks, Bro…
It is probably an update that doesn’t work so well. Don’t give up, mate, you got this. We are all facing this issue.
It works for me, Thank you so much.
Hey, yeah that should work. Turns out my
JAVA_HOME
environment variable was pointing to some older version of java. changed it to latest version of java i had installed “java 17” and had to create a new project from scratch and it is running fine now 👍GALERA, A SOLUÇÃO É ESSA: npm i glob@7.2.0
@Hlacer great start, atleast you know now that, the path is hard, and we need more efforts on RN
Remove the android folder then run
expo eject
worked for me.Updating Android Studio and the JDK to 18 helped me
@THEG77 try install jdk-11. It worked for me
Thanks, now it’s working.
This worked for me PogU Then I was facing
installed it with
npm i react-native-gradle-plugin
and it seems to be working finenvm I’m facing this other issue now
My Java Version Shows:
Finally completely fixed it by changing the
JAVA_HOME
environment variable to a Java version >=11
and created a new project. Working perfectly now@sebastiansiedlarz409 @VeoScript Yes this works. Thanks a lot!
try using
Thank you very much. Let’s continue to refuel together !
This problem occurred at the beginning of learning RN today, which makes me ready to give it up🤔
I have same problem. Few days ago everything works ok. After typing:
npx react-native config
I have no set android paths, but in my older project i have.