-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.UnsatisfiedLinkError: dlopen failed: library "libappmodules.so" not found #38467
Comments
Is the app working fine with the New Architecture disabled? |
With
|
Can you clarify which error are you getting with which flag? @prince-sugarfit |
Sorry, for |
Can we get a reproducer? |
|
By creating a new react native project and putting the things from current project, I've found that below part of app/build.gradle is creating a problem.
Can anyone help me? Here is my CMake file
|
@cortinico Do you know how can I merge these two CMakeLists?
|
I am having same requirement. Thanks for asking. |
Can you @prince-sugarfit or @vtn-dev-manish provide a reproducer project with the linked template: https://github.com/react-native-community/reproducer-react-native It's extremely hard to help you without |
@cortinico Please find this reproducer project I have added cpp lib to the base template & enabled the new architecture, check the last commit |
I could fix it & run the project by copying But, looking for other better way. |
Hey @prince-sugarfit The CI on the reproducer, which builds the project, is also green so I'm unsure what is your problem. Please let me know |
@cortinico Thank you for your response. Yes, It builds successfully but as soon as app opens it crashes with mentioned error. Did you try running locally with metro server on? |
Ah I understand what's going on. The You should be fine by updating the CMakeLists.txt file as follows: # For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html
# Sets the minimum version of CMake required to build the native library.
cmake_minimum_required(VERSION 3.10.2)
# Declares and names the project.
-project("sugarfit")
+project(appmodules)
+# This file includes all the necessary to let you build your application with the New Architecture.
+include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) |
Closing as answered |
Hi @cortinico ![]() |
Did you Solved? |
No need to rebuild third-party
as described in Patch to fix |
Description
Getting below error in android after upgrading to react-native version 0.72.3. App builds successfully and when I open app it crashes on native side.
FATAL EXCEPTION: main
Process: fit.sugar.android.debug, PID: 17748
java.lang.UnsatisfiedLinkError: dlopen failed: library "libappmodules.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
at java.lang.System.loadLibrary(System.java:1664)
at com.facebook.soloader.nativeloader.SystemDelegate.loadLibrary(SystemDelegate.java:24)
at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:52)
at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:30)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:869)
at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load(DefaultNewArchitectureEntryPoint.kt:41)
at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load$default(DefaultNewArchitectureEntryPoint.kt:27)
at com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load(Unknown Source:2)
at fit.cure.android.MainApplication.onCreate(MainApplication.java:89)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
React Native Version
0.72.3
Output of
npx react-native info
System:
OS: macOS 13.0.1
CPU: (10) arm64 Apple M1 Pro
Memory: 108.11 MB / 16.00 GB
Shell:
version: 5.8.1
path: /bin/zsh
Binaries:
Node:
version: 16.14.0
path: ~/.nvm/versions/node/v16.14.0/bin/node
Yarn:
version: 1.22.17
path: /opt/homebrew/bin/yarn
npm:
version: 8.3.1
path: ~/.nvm/versions/node/v16.14.0/bin/npm
Watchman:
version: 2023.07.10.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK: Not Found
Android SDK:
API Levels:
- "19"
- "28"
- "29"
- "30"
- "31"
- "32"
- "33"
- "34"
Build Tools:
- 28.0.3
- 29.0.2
- 30.0.1
- 30.0.2
- 30.0.3
- 31.0.0
- 32.0.0
- 33.0.0
- 33.0.1
- 33.0.2
System Images:
- android-29 | Intel x86 Atom_64
- android-29 | Google APIs Intel x86 Atom
- android-30 | Google APIs ARM 64 v8a
- android-31 | Google APIs ARM 64 v8a
Android NDK: 23.1.7779620
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7935034
Xcode:
version: /undefined
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.12
path: /opt/homebrew/opt/openjdk@11/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.3
wanted: 0.72.3
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce
Upgraded my application react native version from 0.66.3 to 0.72.3
Apply all the changes suggested in upgrade helper
Snack, code example, screenshot, or link to a repository
Here is my build.gradle file,
The text was updated successfully, but these errors were encountered: