-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
MissingLibraryException: librealm-jni.so Realm 6.1.0 #6727
Comments
The |
its included but the output apk or .aab is not including it. |
Sounds like there is a problem in how you are building the app bundle then? |
i don't think so, in the screenshots above i show whats is the result with a previous version of realm. is like the plugin fails putting the .so for armeabi-v7 |
Updating, after generating .aab file, I inspected them and the library is there. After I see on which devices the errors are occurring, all of them are rooted devices. Any other devices still working as expectedly. |
@kelvin-lima How did you solve this? |
@sudokai as i said, the problem only occurs on Rooted devices. I ignored them and now I'm currently migrating to SQLite+Room, because this bug and some other reasons. |
hey @kelvin-lima would you mind emailing me at [email protected] - I would love to pick your brain on some of the other reasons that drove you to migrate to SQLite+Room |
Do we have any updates or workaround? |
@ahulyk i will close the issue, later 2 weeks i found was a issue in the android studio build tool |
What kind of issue in the android studio build tool? |
Still getting this on some devices (Mi 9X android 5.1).
Any ideas? |
Found one instance of this crash for a user in a release apk, we're stuck on 6.1.0 but did any fixes get pushed for 7.0.0 and up? The
Realm version(s): 6.1.0 Realm Sync feature enabled: No Android Studio version: 4.0.1 Android Build Tools version: 28.0.3 Gradle version: 5.4.1 Which Android version and device(s): Clover C300 with Android 4.4.2 |
was facing the same issue, stopped using aab, is the issue fixed on io.realm:realm-gradle-plugin:7.0.0 ? is it safe to use android bundle now ? |
How to avoid this error for armeabi-v7a? I have users with armeabi-v7a architecture and they are rating 1 star because of this issue. I have uploaded apk instead of bundle but still error not resolved for armeabi-v7a devices. |
i was able to reduce the apk size by 5mb using split apk, // APK splitting
upload apks to developer console x86, x86_64, armeabi-v7a, arm64-v8a respectively. |
I updated from Everything seems to be working fine and that error went away |
Using aab in production; seeing this on both Of the 65 occurrences in the last 30 days, all were on rooted Android 4.3 devices. |
Using aab with
|
moving to SQLite+Room |
I'm using realm in react native app lunching time app is crashing any help me....? |
You will see update information In Realm documentation you can find the following: Couldn’t load “librealm-jni.so” If your app uses other native libraries that don’t ship with support for 64-bit architectures, Android will fail to load Realm’s librealm-jni.so file on ARM64 devices. This is because Android cannot load 32-bit and 64-bit native libraries concurrently. The best solution would be to have all libraries provide the same set of supported ABIs, but sometimes that may not be doable if you are using a 3rd-party library. See VLC and Realm Library conflicts. The workaround to this issue is to exclude Realm’s ARM64 library from the APK file by adding the following code to the app’s build.gradle. You can refer to Mixing 32- and 64-bit Dependencies in Android for more information.
Also, there is a bug with Android Gradle Plugin 1.4.0 betas that leads it to improperly pack .so files included in jar files (see Realm Java issue 1421). To solve this problem, you can revert to Android Gradle Plugin 1.3.0 or use Android Gradle Plugin 1.5.0+. We are aware of a number of 3rd party libraries, frameworks and management apps which do not have 64-bit support yet: Parallel Space—but you can advice your users to install the 64 bit version instead. RenderScript—NDK r14 will probably support 64 bit. Unity3d. Nota: Hello, this is appear again if i'm using proguard on my release buildTypes |
Goal
init realm calling Realm.init(context)
Actual Results
Caused by: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'librealm-jni.so'. Looked for: [armeabi-v7a, armeabi], but only found: [].
at com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary(ApkLibraryInstaller.java:173)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:180)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:57)
at io.realm.internal.RealmCore.loadLibrary(RealmCore.java:60)
at io.realm.Realm.initializeRealm(Realm.java:322)
at io.realm.Realm.init(Realm.java:265)
looks like the tool is not including the library .so,but if i use the previous version 6.0.2 its works fine. see images
debug apk with realm 6.0.2 android studio 3.5.3 build tools 3.5.3 , device nexus 6 android 6.0.1
debug apk with realm 6.1.0 android studio 3.5.3 build tools 3.5.3 , device nexus 6 android 6.0.1
Steps & Code to Reproduce
just call Realm.init method in a your oncreate method of your application class.
Version of Realm and tooling
Realm version(s): 6.1.0
Realm Sync feature enabled: No
Android Studio version: 3.5.3
Android Build Tools version: 3.5.3
Gradle version: 5.4.1
Which Android version and device(s): Nexus 5 with android 6.0.1
The text was updated successfully, but these errors were encountered: