software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
6.13k stars 982 forks source link

Fix duplicate `libreactnative.so` and `libjsi.so` #3118

Closed tomekzaw closed 1 month ago

tomekzaw commented 1 month ago

Description

I've started seeing these errors on 0.76.0-rc.1.

FAILURE: Build failed with an exception.

* 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/libjsi.so' from inputs:
      - /Users/tomekzaw/RNOS/Reanimated76/react-native-reanimated/node_modules/react-native-gesture-handler/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/arm64-v8a/libjsi.so
      - /Users/tomekzaw/.gradle/caches/8.10/transforms/e363f8ea49fe13fc78e6ed35173e9914/transformed/react-android-0.76.0-rc.1-debug/jni/arm64-v8a/libjsi.so
     If you are using jniLibs and CMake IMPORTED targets, see
     https://developer.android.com/r/tools/jniLibs-vs-imported-targets
FAILURE: Build failed with an exception.

* 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:
      - /Users/tomekzaw/RNOS/Reanimated76/react-native-reanimated/node_modules/react-native-gesture-handler/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/arm64-v8a/libreactnative.so
      - /Users/tomekzaw/.gradle/caches/8.10/transforms/e363f8ea49fe13fc78e6ed35173e9914/transformed/react-android-0.76.0-rc.1-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

Test plan