Skip to content

Android build error: 2 files found with path 'lib/arm64-v8a/libreactnative.so' from inputs: #202

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
DLawla opened this issue Dec 20, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@DLawla
Copy link

DLawla commented Dec 20, 2024

Hey there,
I'm encounting a build error for Android. This build does pass on iOS.

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:
- /home/expo/workingdir/build/node_modules/@baronha/react-native-multiple-image-picker/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/arm64-v8a/libreactnative.so
      - /home/expo/.gradle/caches/8.10.2/transforms/672b395bf72c7a6fb6406ced23d66ff2/transformed/react-android-0.76.5-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

This, interestingly, is a VERY similar error that we saw on another library we use: RN Vision Camera
Perhaps there is some insight to be gleamed from their error and fix?

Of note, we are using Expo.

RNMIP Version

2.1.0

Dependencies

"dependencies": {
    "@baronha/react-native-multiple-image-picker": "^2.1.0",
    "@expo/react-native-action-sheet": "^3.13.0",
    "@expo/vector-icons": "^14.0.0",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-native-community/datetimepicker": "8.2.0",
    "@react-native-community/netinfo": "11.4.1",
    "@react-native-masked-view/masked-view": "0.3.2",
    "@react-native-picker/picker": "2.9.0",
    "@react-navigation/bottom-tabs": "^6.1.0",
    "@react-navigation/native": "^6.0.7",
    "@react-navigation/native-stack": "^6.5.0",
    "@sentry/react-native": "~6.3.0",
    "@shopify/flash-list": "1.7.1",
    "@wwimmo/react-native-sketch-canvas": "^0.8.5",
    "expo": "~52.0.20",
    "expo-application": "~6.0.1",
    "expo-asset": "~11.0.1",
    "expo-av": "~15.0.1",
    "expo-blur": "~14.0.1",
    "expo-camera": "~16.0.10",
    "expo-constants": "~17.0.3",
    "expo-dev-client": "~5.0.6",
    "expo-device": "~7.0.1",
    "expo-file-system": "~18.0.6",
    "expo-font": "~13.0.1",
    "expo-haptics": "~14.0.0",
    "expo-image": "~2.0.3",
    "expo-image-picker": "~16.0.3",
    "expo-linear-gradient": "~14.0.1",
    "expo-linking": "~7.0.3",
    "expo-localization": "~16.0.0",
    "expo-media-library": "~17.0.4",
    "expo-network": "~7.0.4",
    "expo-notifications": "~0.29.11",
    "expo-secure-store": "~14.0.0",
    "expo-sharing": "~13.0.0",
    "expo-splash-screen": "~0.29.18",
    "expo-sqlite": "~15.0.3",
    "expo-status-bar": "~2.0.0",
    "expo-store-review": "~8.0.0",
    "expo-updates": "~0.26.10",
    "expo-video-thumbnails": "~9.0.2",
    "expo-web-browser": "~14.0.1",
    "i18n-js": "^4.1.1",
    "metro-react-native-babel-transformer": "^0.77.0",
    "mime": "^3.0.0",
    "moti": "^0.24.2",
    "pack-spheres": "^1.0.4",
    "package": "^1.0.1",
    "patch-package": "^8.0.0",
    "postinstall-postinstall": "^2.1.0",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-native": "0.76.5",
    "react-native-dialog": "^9.2.1",
    "react-native-draggable-flatlist": "^4.0.1",
    "react-native-gesture-handler": "~2.20.2",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-nitro-modules": "^0.18.2",
    "react-native-popup-menu": "^0.15.12",
    "react-native-purchases": "^7.1.0",
    "react-native-reanimated": "~3.16.1",
    "react-native-safe-area-context": "4.12.0",
    "react-native-screens": "~4.1.0",
    "react-native-static-safe-area-insets": "^2.2.0",
    "react-native-svg": "15.8.0",
    "react-native-swipeable-item": "^2.0.9",
    "react-native-switch": "^1.5.1",
    "react-native-vision-camera": "^4.6.1",
    "react-native-web": "~0.19.13",
    "react-native-webview": "13.12.5",
    "reflect-metadata": "^0.1.13",
    "svg-path-properties": "^1.1.0",
    "typeorm": "^0.3.7"
  },

Debug notes

Things I have tried that have not worked:

  • Dropping to RNMIP version 2.0.0
  • using Nitro 0.19.0+

Happy to provide more details if this helps.

Thanks!

@DLawla DLawla changed the title 2 files found with path 'lib/arm64-v8a/libreactnative.so' from inputs: Android build error: 2 files found with path 'lib/arm64-v8a/libreactnative.so' from inputs: Dec 20, 2024
@baronha
Copy link
Member

baronha commented Dec 20, 2024

Try Nitro 0.18.2

@DLawla
Copy link
Author

DLawla commented Dec 20, 2024

Hi @baronha!
I'm currently using "react-native-nitro-modules": "^0.18.2"

@DLawla
Copy link
Author

DLawla commented Dec 20, 2024

Just became a sponsor to support your work @baronha -- thanks!

@baronha
Copy link
Member

baronha commented Dec 20, 2024

Just became a sponsor to support your work @baronha -- thanks!

Thank you for your support. I will see suggestions from Vision Camera so I can fix it as soon as possible.
Thank you very much

@baronha baronha self-assigned this Dec 20, 2024
@baronha baronha added the bug Something isn't working label Dec 20, 2024
baronha added a commit that referenced this issue Dec 20, 2024
baronha added a commit that referenced this issue Dec 20, 2024
baronha added a commit that referenced this issue Dec 20, 2024
baronha added a commit that referenced this issue Dec 20, 2024
@baronha
Copy link
Member

baronha commented Dec 20, 2024

And using:

npx expo install @baronha/react-native-multiple-image-picker 
npx expo install react-native-nitro-modules@0.18.2 -- --dev
npx expo prebuild

@DLawla
Copy link
Author

DLawla commented Dec 20, 2024

Thanks @baronha, android builds now -- really appreciate your work!

@DLawla DLawla closed this as completed Dec 20, 2024
@baronha
Copy link
Member

baronha commented Dec 21, 2024

Thanks @baronha, android builds now -- really appreciate your work!

I will try to upgrade to Nitro 20 today. Thank you for trusting this library
#210

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants