react-native-PDFView icon indicating copy to clipboard operation
react-native-PDFView copied to clipboard

2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs...-react native

Open huydosgtech opened this issue 3 years ago • 6 comments

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' }

}

huydosgtech avatar May 17 '22 03:05 huydosgtech

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)

JoniVR avatar May 31 '22 11:05 JoniVR

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.

stale[bot] avatar Jul 10 '22 21:07 stale[bot]

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.

stale[bot] avatar Aug 13 '22 13:08 stale[bot]

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.

stale[bot] avatar Nov 02 '22 03:11 stale[bot]

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

quocb avatar Apr 19 '23 20:04 quocb

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?

rumax avatar Apr 20 '23 14:04 rumax