Execution failed for task ':app:mergeDebugNativeLibs' while upgrading to Gradle 7.x

2.7k Views Asked by At

I am following the doc to update the react-native architecture to the new turbo and fabric. I upgraded Gradle to 7. I am facing the following issue. Please help. link to error link to tried solution but it didn't work

1

There are 1 best solutions below

0
On

If you are working on react-native. I got the same error when I enabled new architecture, which I resolved by making changes to the android/app/build.gradle by adding the following code

android {
   ......other code

   packagingOptions {
      pickFirst 'lib/arm64-v8a/libbutter.so'
   }
}

you might get other path errors with different architecture like 'lib/x86/libyoga.s' which you can include as above pickFirst'lib/x86/libyoga.s' in the next line. Clean and rebuild. I got the reference from https://github.com/tanersener/react-native-ffmpeg/issues/227