skip to Main Content
  • What went wrong:
    Execution failed for task ‘:app:mergeDevelopmentDebugNativeLibs’.

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:UsersUser.gradlecachestransforms-3e46e17d597ff8468963db24ef7ea08f6transformedjetified-arm64_v8a_debug-1.0.0-74d16627b940bb15e50891f82cad6c3e3465bd6darm64-v8alibc++_shared.so
– C:UsersUser.gradlecachestransforms-398560fdb2c1a483439c351cd6deea1fctransformedjetified-pdfium-android-1.9.2jniarm64-v8alibc++_shared.so
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets

so this error that preventing me to run my application happen after i upgrade my flutter and all of my dependencies

after that i do this:

packagingOptions {
    resources.excludes.add("META-INF/*")
    // exclude '/lib/arm64-v8a/libc++_shared.so'

}

2

Answers


  1. Chosen as BEST ANSWER

    As Jose Georges says, it's all good when I downgrade my Flutter to version 3.13.9. The issue is with flutter_pdfviewer 1.3.2 and flutter 3.16.0.


  2. This issue indeed comes from all the flutter packages with a pdf viewer on flutter 3.16.0 and it seems to happen only on Android.
    So the temporary solution is to add this in your app gradle inside android{}:

    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'
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search