Skip to content

Conversation

YOEL311
Copy link
Contributor

@YOEL311 YOEL311 commented Aug 22, 2025

Summary

Removes the line from example/android/settings.gradle that references native_modules.gradle.
This file no longer exists in React Native 0.79+ projects and its inclusion breaks the build.

Details

  • Removed line:
    apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
  • With React Native 0.79+, the file native_modules.gradle is not present in the default template.
  • See React Native 0.79.6 settings.gradle template for reference.
  • Fixes #100.

Motivation

Build fails with the following error:

A problem occurred evaluating settings 'fastopencv.example'.
> Could not read script '../example/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' as it does not exist.

Removing the line resolves the issue and aligns with upstream React Native template.

Test Plan

  • Verified that the example app builds successfully after removing the line on RN 0.79+

remove not support line
@lukaszkurantdev lukaszkurantdev merged commit a2dbcc7 into lukaszkurantdev:main Sep 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build error in example project: native_modules.gradle does not exist
2 participants