Skip to content

Commit

Permalink
fix build failure due to duplicate libc++_shared.so (#27417)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dulmandakh authored and facebook-github-bot committed Dec 5, 2019
1 parent 90ab8b8 commit 2fd5088
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions template/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}

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 2fd5088

Please sign in to comment.