Search code examples
flutterflutter-dependencies

Flutter : A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction


  • 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:\Users\User.gradle\caches\transforms-3\e46e17d597ff8468963db24ef7ea08f6\transformed\jetified-arm64_v8a_debug-1.0.0-74d16627b940bb15e50891f82cad6c3e3465bd6d\arm64-v8a\libc++_shared.so - C:\Users\User.gradle\caches\transforms-3\98560fdb2c1a483439c351cd6deea1fc\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

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'

}

Solution

  • 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.