-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Describe the bug:
When integrating my React Native 0.83.0 app as a library (.aar) into a native Android project (brownfield approach), the app crashes immediately on launch with:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/react/soloader/OpenSourceMergedSoMapping;
Steps to reproduce:
Build a .aar from a React Native 0.83.0 app.
Add the .aar as a dependency in a native Android project.
Initialize ReactNativeHost in MainActivity.
Run the app → crashes immediately.
Expected behavior:
The app should launch and load the React Native view successfully.
Stack trace:
FATAL EXCEPTION: main
Process: com.example.nedemofitsdk, PID: 8069
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/react/soloader/OpenSourceMergedSoMapping;
at com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative(ReactNativeApplicationEntryPoint.java:25)
at com.yourapp.reactnativeapp.ReactNativeHostManager.initialize(ReactNativeHostManager.kt:11)
at com.example.nedemofitsdk.MainActivity.onCreate(MainActivity.kt:21)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.react.soloader.OpenSourceMergedSoMapping"...
Environment:
React Native version: 0.83.0
Gradle: Latest compatible with RN 0.83.0
Android SDK: API 36
Additional context / Notes:
Likely caused by missing SoLoader dependency in the host native project.
Adding implementation 'com.facebook.soloader:soloader:0.10.1' or equivalent in the host project might fix it.