Skip to content

Commit

Permalink
android build: Prevent build failure with duplicate libc++_shared.so.
Browse files Browse the repository at this point in the history
Part of the RN v0.61 -> v0.62 changes to the template app [1],
corresponding to facebook/react-native@2fd50882b. It's described as
a way to handle the case where dependencies, such as Flipper (a
thing newly available with the upgrade), "might" also depend on
libc++_shared.so, causing build failures. I didn't get any build
failures or runtime errors with this commit placed here, before the
main upgrade commit.

[1] https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.62.2
  • Loading branch information
chrisbobbe authored and gnprice committed Sep 11, 2020
1 parent d290aaf commit d5c4471
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ android {
}
}
}

packagingOptions {
pickFirst "lib/armeabi-v7a/libc++_shared.so"
pickFirst "lib/arm64-v8a/libc++_shared.so"
pickFirst "lib/x86/libc++_shared.so"
pickFirst "lib/x86_64/libc++_shared.so"
}

// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
Expand Down

0 comments on commit d5c4471

Please sign in to comment.