-
Notifications
You must be signed in to change notification settings - Fork 26
Description
I'm experiencing a build failure when trying to create an AAR file using the React Native Brownfield plugin. The build process fails with a "Duplicate resources" error during the packageDebugResources
task.
Error Details:
Execution failed for task ':rnbrownfieldLibrary:packageDebugResources'.
[color/red] */brownfield-test/react-native-brownfield/android/rnbrownfieldLibrary/build/intermediates/exploded-aar/rnbrownfield/react-native-video/unspecified/debug/res/values/values.xml
[color/red] */brownfield-test/react-native-brownfield/android/rnbrownfieldLibrary/build/intermediates/exploded-aar/rnbrownfield/react-native-firebase_messaging/unspecified/debug/res/values/values.xml: Error: Duplicate resources
Environment:
- React Native Brownfield Plugin:
@callstack/react-native-brownfield@^1.2.0
- React Native Version:
0.77.2
- Android Compile SDK:
35
- Min SDK:
24
- Build Tool: Gradle with Kotlin DSL
Steps to Reproduce:
- Clone this example repo
https://github.com/hidaeraldo/brownfield-test
cd react-native-brownfield
folder- Install
react-native-video
and@react-native-firebase/messaging
as dependencies - Attempt to build the AAR file using
./gradlew publishToMavenLocal
or similar command - Build fails during the
packageDebugResources
task
Current Configuration:
The issue occurs in the rnbrownfieldLibrary
module with the following build.gradle.kts configuration:
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("com.facebook.react")
id("com.callstack.react.brownfield")
`maven-publish`
}
react {
autolinkLibrariesWithApp()
}
Dependencies Involved:
react-native-video: ^6.16.1
@react-native-firebase/messaging: ^21.4.1
Actual Behavior:
Build fails with duplicate resources error, preventing the AAR from being generated.
Workaround Attempts:
- Tried adding resource exclusions in the
packaging
block but the issue persists - The error occurs even with the default autolinking configuration