You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: res/values of dependencies overwrite each other in the AAR #490
When more than one dependency ships res/values resources, the brownfield AAR keeps only one of them. Every exploded AAR stores its values in res/values/values.xml, and CopyExplodedResTask copies each dependency's res directory into one output with copyRecursively(out, overwrite = true) (ResourceTaskProcessor.kt), so each values.xml replaces the previous one.
The attributes, styles, and colors of the overwritten dependencies are missing from the AAR, while files in other folders that reference them (for example values-v31) are kept. The consumer app then fails at resource linking:
error: resource attr/bootSplashBackground (aka com.example:attr/bootSplashBackground) not found.
Repro: a React Native project with react-native-bootsplash 7.1.0 and @callstack/react-native-brownfield (which ships its own res/values/values.xml). After brownfield package:android, the AAR's res/values/values.xml contains only React Native Brownfield's style, and the consumer app's processReleaseResources fails as above.
Workaround: remove the dependency, or declare its missing resources in the consumer app.
Possibly related: #125, which reported duplicate resources during AAR packaging.
Tested with: @callstack/react-native-brownfield 5.3.0, brownfield-gradle-plugin 2.0.0-alpha10, React Native 0.85.2. The code above is unchanged on main.
Activity
gronxb commentedon Oct 14, 2026
Closing this one as it's no longer blocking me. Feel free to reopen if it's worth tracking.
fix(bgp): merge res/values of embedded libraries instead of overwriting
fix(bgp): merge res/values of embedded libraries instead of overwriting
fix(bgp): merge res/values of embedded libraries instead of overwriting
fix(bgp): merge res/values of embedded libraries instead of overwriting
fix(bgp): merge res/values of embedded libraries instead of overwriting
fix(bgp): merge res/values of embedded libraries instead of overwriti…