Closed
Description
When trying to build an android app with react-native-fast-opencv and RN 0.76, I'm encountering this issue:
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
> 2 files found with path 'lib/arm64-v8a/libreactnative.so' from inputs:
- /{PROJECT}/node_modules/react-native-fast-opencv/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/arm64-v8a/libreactnative.so
- /{HOME}/.gradle/caches/8.10.2/transforms/573cdfd81d430937d6482453a3d2d79d/transformed/react-android-0.76.2-debug/jni/arm64-v8a/libreactnative.so
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets
I'm already using v0.3.2 (the one that includes fixes for RN 0.76).
This patch in build.gradle
fixes the issue for my app.
"**/libc++_shared.so",
"**/libfbjni.so",
"**/libjsi.so",
+ "**/libreactnative.so",
"**/libreactnativejni.so",
"**/libturbomodulejsijni.so",
"**/libreact_nativemodule_core.so",
I copied it from vision-camera that had a similar issue
So unless I'm missing something, I guess this is the right fix :) I can open a PR if it's helpful
Metadata
Metadata
Assignees
Labels
No labels