Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Android: App fails to build #204

Open
MennatullahMohamed opened this issue Sep 21, 2023 · 1 comment
Open

Android: App fails to build #204

MennatullahMohamed opened this issue Sep 21, 2023 · 1 comment

Comments

@MennatullahMohamed
Copy link

MennatullahMohamed commented Sep 21, 2023

Description

App fails while building on android only.
I've followed the document carefully and tried many solutions from the open issues here with no success

Package.json

"react": "17.0.2",
"react-native": "0.68.5",
"rive-react-native": "^6.0.4"

Failure

Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeStagingDebugNativeLibs'.
> 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/mennaibrahim/.gradle/caches/transforms-3/bbe72318b10c36ed25de961229d71538/transformed/jetified-react-native-0.68.5/jni/arm64-v8a/libc++_shared.so
      - /Users/mennaibrahim/.gradle/caches/transforms-3/cfec5debcfef80703ef16a8c0084d64d/transformed/jetified-rive-android-8.2.1/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

I've seen this solution to add pickFirst options in build.gradle as shown below:

  packagingOptions {
        pickFirst 'lib/x86/libc++_shared.so'
        pickFirst 'lib/x86_64/libc++_shared.so'
        pickFirst 'lib/armeabi-v7a/libc++_shared.so'
        pickFirst 'lib/arm64-v8a/libc++_shared.so'
    }

the app build successfully but crashes on runtime

@hieuptit93
Copy link

same issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants