2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs...-react native
I think missing in config file for android. please add following to your android/app/build.gradle**
android {
packagingOptions { pickFirst 'lib/x86/libc++_shared.so' pickFirst 'lib/x86_64/libjsc.so' pickFirst 'lib/arm64-v8a/libjsc.so' pickFirst 'lib/arm64-v8a/libc++_shared.so' pickFirst 'lib/x86_64/libc++_shared.so' pickFirst 'lib/armeabi-v7a/libc++_shared.so' }
}
I can confirm this is an issue @rumax I had to add these lines inside my own /android/app/build.gradle file, but it would be better to add them to the library. I think these are conflicting with another popular lib (not sure iirc but could have been reanimated or gesture-handler)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Getting this same issue but only when trying to do a release build with detox. Runs fine in debug on emulator.
Adding the packagingOptions as suggested by @huydosgtech to my own android/app/build.gradle doesn't do anything, but if I add it to node_modules/react-native-view-pdf/android/build.gradle then it works.
I'd be fine if adding it to my own android/app/build.gradle. Wondering if there's anything else I can do besides using patch-package? Thanks for any help!
Execution failed for task ':react-native-view-pdf:mergeDebugAndroidTestNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
> 2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:
- /Users/quocbui/.gradle/caches/transforms-3/dc830d8b3ffa0d5eb10573e829277b87/transformed/jetified-react-android-0.71.7-debug/jni/arm64-v8a/libc++_shared.so
- /Users/quocbui/.gradle/caches/transforms-3/6bfde66eb9d103e7d37bb4b458eeea88/transformed/jetified-pdfium-android-1.9.2/jni/arm64-v8a/libc++_shared.so
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets
And solution used in demo project is not working for you? Any chance that you can reproduce it in demo project at least and create a branch with the change?