Skip to content

Commit bc24731

Browse files
authored
fix(Android): patch potential issues with Android build since RN lib-merge in 0.76 (#2602)
## Description Fixes #2463 I haven't been able to reproduce the issue, however multiple people reported & confirmed it Thanks @vadzimk for [pointing these out](#2463 (comment)). When adding support for 0.76.0 we overlooked that we relied on RN library structure (and naming) not only in CMake build but also in Gradle configuration. I've looked up whether reanimated team did this - and [they did](https://github.com/software-mansion/react-native-reanimated/pull/6499/files#diff-1c0b83a843e69ff75029daed5b4befe9f46d71042a974e7defe9ded23456e0fd) & we will follow their lead here. ## Changes Added `libfbjni` & `libreactnative` to exclude list so that these are subject of `duplicated dependency` error. ## Test code and steps to reproduce WIP ## Checklist - [ ] Included code example that can be used to test this change - [ ] Updated TS types - [ ] Updated documentation: <!-- For adding new props to native-stack --> - [ ] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [ ] Ensured that CI passes
1 parent d6431ed commit bc24731

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

android/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,13 @@ android {
159159
"**/libc++_shared.so",
160160
"**/libreact_render*.so",
161161
"**/libreactnativejni.so",
162-
"**/libreact_performance_timeline.so"
162+
"**/libreact_performance_timeline.so",
163+
// In 0.76 multiple react-native's libraries were merged and these are the main new artifacts we're using.
164+
// Some of above lib* names could be removed after we remove support for 0.76.
165+
// https://github.com/facebook/react-native/pull/43909
166+
// https://github.com/facebook/react-native/pull/46059
167+
"**/libfbjni.so",
168+
"**/libreactnative.so"
163169
]
164170
}
165171
sourceSets.main {

0 commit comments

Comments
 (0)