I have created an app in react native for my project. When I copy my projects file in the app folder then run the app it said that in node_module react-redux is not exist then I installed react-redux using
npm install firstname.lastname@example.org in my app folder after that when I run
run-android command in command prompt for this project it is telling that -
Could not read script 'E:\AppFolder\MyApp\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' as it does not exist. .
After that, I wiped the data of emulator and run
run-android, but it is still giving me the same error and app is not installing in the emulator.
Here is the error which command prompt is displaying :
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)... Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details FAILURE: Build failed with an exception. * Where: Settings file 'E:\AppFolder\MyApp\android\settings.gradle' line: 4 * What went wrong: A problem occurred evaluating settings 'TribeBond'. > Could not read script 'E:\AppFolder\MyApp\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' as it does not exist. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 1m 10s error Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/getting-started.html error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.```
Same issue here when first initiating Android Studio on project:
Could not read script '/Users/danale/Projects/NFIBEngage/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' as it does not exist.
When I looked inside node_modules/@react-native-community/cli-platform-android, sure enough there was no
I also found I had to manually
npm i @react-native-community/cli-platform-android and then it worked.