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

libc++_shared.so conflict #287

Open
deboLing opened this issue Sep 28, 2024 · 2 comments
Open

libc++_shared.so conflict #287

deboLing opened this issue Sep 28, 2024 · 2 comments

Comments

@deboLing
Copy link

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/libc++_shared.so' from inputs:
- C:\Users\zhouyi.gradle\caches\transforms-3\324d8a4e270f29d97b6229048d022aa3\transformed\jetified-ffmpeg-kit-full-gpl-6.0-2\jni\arm64-v8a\libc++_shared.so
- C:\Users\zhouyi.gradle\caches\transforms-3\e5ebbbde1d6dc67769a08ea07b4a883c\transformed\jetified-pdfium-android-1.9.2\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

@myhoaicv
Copy link

myhoaicv commented Oct 3, 2024

I have the same error. Is there any other solution?

@Bejkerr
Copy link

Bejkerr commented Oct 16, 2024

I was able to resolve it by adding this under android{} block in app/build.gradle:

       packagingOptions {
        jniLibs.pickFirsts.add("**/libc++_shared.so")
    }

And this to AndroidMainfest.xml:

   <application
        android:extractNativeLibs="true">

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

3 participants