native_modules.gradle file is not downloading
See original GitHub issueI 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 react-redux@7.0.3
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.```
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:7
Top Results From Across the Web
App not building after installing Native Module in React Native?
Try checking '/node_modules/react-native-schedule-sms/android/build.gradle' file at line 17. Check if it's using 'implementation' instead of ' ...
Read more >Setting Up React Native Build Environments Using ...
First, we'll need to edit our build.gradle file to be able to create different builds. Add buildTypes within android and add whatever ...
Read more >Prerequisites for Applications - React Native
There are a few prerequisites that should be addressed before the New Architecture is enabled in your application.
Read more >Gradle Build Tool
Accelerate developer productivity. Gradle helps teams build, automate and deliver better software, faster.
Read more >Fixing gradle errors of C++ JSI native modules
cmake:6 (include): include could not find load file: /Users/***/Library/Android/sdk/ndk/23.0.7123448/build/cmake/android.toolchain.cmake Call ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I got similar issue when android-cli part wasn’t installed.
> Could not read script 'my-code-path\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' as it does not exist.
I had to manually install the Android cli package.
npm i @react-native-community/cli-platform-android
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.