A problem occurred evaluating settings 'RNBaseLayer'.
Could not read script '/Users/vishalbhojane/Documents/work/rnbaselayer/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' as it does not exist.
Assistant
The error message indicates that during the Gradle build process for your React Native project, it tried to read the script file:
but this file does not exist. This usually happens when the native modules Gradle script is expected but isn’t found, often because of misconfiguration, missing dependencies, or an incomplete node_modules setup.
Possible causes & fixes:
1. Missing or outdated @react-native-community/cli-platform-android package
In recent React Native versions, the CLI platform packages were split out but sometimes you need to ensure you have the right version.
Check if this path matches your actual file structure. If the native_modules.gradle file does not exist under node_modules/@react-native-community/cli-platform-android/, it might have moved or been deprecated.
4. React Native version compatibility
Your React Native version might not match the way you are referencing native modules.
For React Native 0.60+ and onwards, autolinking is used, and you might not need to manually apply native_modules.gradle.
If you upgraded an older project, some manual steps might remain in your Gradle scripts.
Try commenting out the line applying native_modules.gradle in your Gradle files to see if it builds without it, or update your project following the React Native upgrade guides.
5. Use the new CLI
For newer React Native versions, the community CLI package changed, so this file might no longer exist here.