3

Hey folks I am facing a critical issue on project while running the app on Android. I have visited the related question but not found any solution. Error is following.

complete error:  Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: library "libreanimated.so" not found
react-native version: 0.67.3
react-native-reanimated: 2.10.0

classpath("com.android.tools.build:gradle:7.0.0")

minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31

This error is showing when I install the react-native-reanimated package if I remove this package then this error is removed but I need this package because my drawer navigation depend on this pacakge

If anyone face this issue and resolved it completely Please guide me the right direction.

fatihyildizhan
  • 8,614
  • 7
  • 64
  • 88

2 Answers2

0

Late to the party but I struggled a bit with this error.

Make sure the following:

on app/build.gradle right above this line: apply from: "../../node_modules/react-native/react.gradle" add:

project.ext.react = [
        enableHermes: true,
        bundleInDebug: true <--- make sure this is set to true
]

// also add this to force rebuild reanimated:
project.ext.reanimated = [
        buildFromSource: true
]

Stathis Ntonas
  • 1,222
  • 2
  • 20
  • 49
-1

I have been facing this issue since 2 Dec 2022. Please add the following line in your build.gradle (app) in side Android.

packagingOptions 
{   
 pickFirst 'lib/armeabi-v7a/libreanimated.so' <=== this one
}
fatihyildizhan
  • 8,614
  • 7
  • 64
  • 88
Lalit kumar
  • 2,377
  • 1
  • 22
  • 17
  • 1
    the libreanimated.so file is not being included in the APK. How can this resolve the issue? This would solve if multiple .so files with the same name were found – joao2fast4u Feb 01 '23 at 11:09