react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

Build error: "2 files found with path 'lib/arm64-v8a/libjsi.so"

Open viocuong opened this issue 1 year ago • 4 comments

Description

I can't build when installing lib react-native-gesture-handler: 2.16.0 The error occurs as below and I can't figure out what the reason is. image

Steps to reproduce

  1. yarn add react-native-gesture-handler
  2. yarn android

Snack or a link to a repository

Only a dependency

Gesture Handler version

2.16.0

React Native version

0.74.1

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Android emulator

Device model

pixel 3a api 33

Acknowledgements

Yes

viocuong avatar May 03 '24 11:05 viocuong

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

github-actions[bot] avatar May 03 '24 11:05 github-actions[bot]

Here is the information when running npx react-native info System: OS: macOS 14.2.1 CPU: (10) arm64 Apple M2 Pro Memory: 82.14 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.11.1 path: ~/.nvm/versions/node/v20.11.1/bin/node Yarn: version: 1.22.22 path: ~/development/project/Android-repo/node_modules/.bin/yarn npm: version: 10.4.0 path: /opt/homebrew/bin/npm Watchman: version: 2024.01.22.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /Users/cuongnv/.rbenv/shims/pod SDKs: iOS SDK: Platforms: - DriverKit 23.2 - iOS 17.2 - macOS 14.2 - tvOS 17.2 - visionOS 1.0 - watchOS 10.2 Android SDK: API Levels: - "28" - "29" - "30" - "31" - "32" - "33" - "33" - "34" Build Tools: - 29.0.2 - 30.0.2 - 30.0.3 - 33.0.1 - 33.0.2 - 34.0.0 System Images: - android-30 | Google APIs ARM 64 v8a - android-30 | Google Play ARM 64 v8a - android-33 | Google APIs ARM 64 v8a - android-34 | Google Play ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2022.3 AI-223.8836.35.2231.10406996 Xcode: version: 15.2/15C500b path: /usr/bin/xcodebuild Languages: Java: version: 17.0.8 path: /usr/bin/javac Ruby: version: 3.3.0 path: /Users/cuongnv/.rbenv/shims/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.73.3 wanted: 0.73.3 react-native-macos: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: true newArchEnabled: false

viocuong avatar May 03 '24 11:05 viocuong

I solved it in the following way, I think this is not a good way.

// build.gradle

android {
    packagingOptions {
        pickFirst 'lib/x86/*'
        pickFirst 'lib/x86_64/*'
        pickFirst 'lib/armeabi-v7a/*'
        pickFirst 'lib/arm64-v8a/*'
    }
    ...
}

viocuong avatar May 03 '24 13:05 viocuong

Have you tried deleting the Gradle caches and doing a clean build of the project?

If that doesn't help, would you be able to prepare a repository with a project that would allow us to reproduce it?

j-piasecki avatar May 08 '24 14:05 j-piasecki