You can try removing the code apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
in android/app/build.gradle
.
As suggested here. I faced the same issue recently and fixed it after removing that line.