react-native-reanimated
react-native-reanimated copied to clipboard
Failure to boot after upgrade to 2.10.0 with dlopen failed: library "libreanimated.so" not found.
Description
After upgrading from 2.9.1
to 2.10.0
clearing absolutely all caches and rebuilding our app fails to start with the following error:
ERROR Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: library "libreanimated.so" not found
LOG Running "MobileApp" with {"rootTag":1}
ERROR Invariant Violation: "MobileApp" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
error: Error: Unable to resolve module react-native-reanimated from /mobile_app/node_modules/@react-navigation/drawer/src/views/DrawerView.tsx: react-native-reanimated could not be found within the project or in these directories:
After downgrading the app continues to boot and work as normal.
Potentially useful information from App:
-
compileSdkVersion = 31
-
targetSdkVersion = 31
- Gradle version
7.2
- Gradle Plugin:
com.android.tools.build:gradle:7.0.1
-
enableHermes: false
- Node
v16.15.0
Steps to reproduce
- Upgrade from
2.9.1
to2.10.0
- Clear all caches
- Attempt to
run-android
- See failure on app boot.
- Downgrade back to
2.9.1
to confirm still working.
Snack or a link to a repository
hard to produce a full app mvce
Reanimated version
2.10.0
React Native version
0.68.3
Platforms
Android
JavaScript runtime
No response
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Release mode
Device
Android emulator
Device model
Pixel 2 - Android 11.0 Google Play | x86_64
Acknowledgements
Yes
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Hey @whithajess, thanks for submitting the issue.
One of the reasons why this error might occur is that the app is build for different Android ABI than the emulator you are currently using.
Can you please confirm that the app has been indeed built for x86_64?
You can rename the *.apk
file to *.zip
, unpack it and check if lib/x86_64/libreanimated.so
exists.
I have the same issue in Android device in debug mode.
I had to add this to my build.gradle file (note the addition of the lib/**/libreanimated.so)
packagingOptions { jniLibs { pickFirsts += ['**/libc++_shared.so', 'lib/**/libreanimated.so'] } }