I am trying to create a react-native project using react-native cli. Command I used to create project
After this if I try to run this app by
But I get this 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.
I have android, ios folder in root project and node version is 16.15.0
This is my project json:
{
"name": "test",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"react": "17.0.2",
"react-native": "0.68.2"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.67.0",
"react-test-renderer": "17.0.2"
},
"jest": {
"preset": "react-native"
}
}
I was facing the same issue too so i've created a thread on r/reactnative and someone kind provided a solution. Not sure why, but it works for me. The solution is:
https://www.reddit.com/r/reactnative/comments/uphynu/hello_there_is_a_new_error_i_guess/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With