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: local jars of dependencies (libs/*.jar) are not packaged into the AAR #489
The Gradle plugin does not package the local jars of a dependency (libs/*.jar inside its exploded AAR) into the brownfield AAR. A library that ships a jar in android/libs builds and runs fine in a regular app, but the consumer of the brownfield AAR crashes at runtime with NoClassDefFoundError for the jar's classes.
AndroidArchiveLibrary.getLocalJars() returns those jars, but nothing calls it: AndroidArchiveLibrary.kt defines it, and MergeClassesTask only merges each dependency's classes.jar (MergeClassesTask.kt).
Repro: add a dependency whose android/build.gradle has implementation files("libs/some.jar"), package with brownfield package:android, and use a class from the jar in the consumer app. The class is missing from the AAR.
Workaround: ship the jar's sources in the library instead of the jar.
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, since I worked around it by compiling the library's sources instead of shipping the jar. Feel free to reopen if it's worth tracking.
fix(bgp): package local jars of embedded libraries into the AAR
fix(bgp): package local jars of embedded libraries into the AAR
fix(bgp): package local jars of embedded libraries into the AAR
fix(bgp): package local jars of embedded libraries into the AAR (#512)