Closed
Description
Describe the bug
I've expected crash could not load needed library 'libhermes.so' for 'libreanimated.so'
after installing react-native-reanimated@2.2.4
with Android API 16:
E/AndroidRuntime: FATAL EXCEPTION: create_react_context
java.lang.ExceptionInInitializerError
at com.swmansion.reanimated.NodesManager.initWithContext(NodesManager.java:127)
at com.swmansion.reanimated.ReanimatedJSIModulePackage.getJSIModules(ReanimatedJSIModulePackage.java:18)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1256)
at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:131)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1016)
at java.lang.Thread.run(Thread.java:856)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1891]: 1172 could not load needed library 'libhermes.so' for 'libreanimated.so' (load_library[1093]: Library 'libhermes.so' not found)
at java.lang.Runtime.loadLibrary(Runtime.java:370)
at java.lang.System.loadLibrary(System.java:535)
at com.swmansion.reanimated.NativeProxy.<clinit>(NativeProxy.java:22)
at com.swmansion.reanimated.NodesManager.initWithContext(NodesManager.java:127)
at com.swmansion.reanimated.ReanimatedJSIModulePackage.getJSIModules(ReanimatedJSIModulePackage.java:18)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1256)
at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:131)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1016)
at java.lang.Thread.run(Thread.java:856)
To Reproduce
Steps to reproduce the behaviour:
- Create react-native project with
npx react-native init AwesomeProject --template react-native-template-typescript@6.5.13
- Add react-native-ui-lib
- Add react-native-gesture-handler
- Follow the guide to add react-native-reanimated@2.2.4
- Clean a build after enabling Hermes during the last step
- Build an app with Nexus S Android device API 16
- See a crash in your Android Studio console
Expected behaviour
An app runs and doesn't crash
Code snippet
Not needed
Screenshots
Device (please complete the following information)
- Device: Nexus S
- OS: Android API 16 (Google APIs)
Additional context
When I do the same steps with device Pixel 2 API 29
everything is OK, no crash. Also, API 16 device doesn't crash if just enable Hermes without adding react-native-ui-lib