Skip to content

Commit 2fd5088

Browse files
dulmandakhfacebook-github-bot
authored andcommitted
fix build failure due to duplicate libc++_shared.so (#27417)
Summary: This PR fixes build failure caused by duplicate libc++_shared.so, because dependencies (like Flipper) might include one in addition to RN. ## Changelog [Android] [Changed] - fix build failure due to duplicate libc++_shared.so Pull Request resolved: #27417 Test Plan: Create a project from master, then build and run. Build will fail without the patch, and succeed with the patch. Differential Revision: D18827583 Pulled By: mdvacca fbshipit-source-id: 1272cedd299278403f87215c36aaf58217eae3c5
1 parent 90ab8b8 commit 2fd5088

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

template/android/app/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,14 @@ android {
163163
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
164164
}
165165
}
166+
167+
packagingOptions {
168+
pickFirst "lib/armeabi-v7a/libc++_shared.so"
169+
pickFirst "lib/arm64-v8a/libc++_shared.so"
170+
pickFirst "lib/x86/libc++_shared.so"
171+
pickFirst "lib/x86_64/libc++_shared.so"
172+
}
173+
166174
// applicationVariants are e.g. debug, release
167175
applicationVariants.all { variant ->
168176
variant.outputs.each { output ->

0 commit comments

Comments
 (0)