Navigation

Troubleshooting - Android SDK

If your app uses 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 happens because Android cannot load 32-bit and 64-bit native libraries concurrently. Ideally, all libraries could provide the same set of supported ABIs, but sometimes that may not be doable when using a 3rd-party library.

To work around this issue, you can exclude Realm’s ARM64 library from the APK file by adding the following code to the application’s build.gradle. You can refer to Mixing 32- and 64-bit Dependencies in Android for more information.

android {
//...
packagingOptions {
exclude "lib/arm64-v8a/librealm-jni.so"
}
//...
}
Tip
See also:

Realm collects anonymous analytics when you run the Realm bytecode transformer on your source code. This is completely anonymous and helps us improve the product by flagging:

  • which version of the SDK you use
  • which operating system you use
  • if your application uses Kotlin
  • if your application uses local-only Realm Database or Realm Sync

Analytics do not run when your application runs on user devices - only when you compile your source code. To opt out of analytics, you can set the REALM_DISABLE_ANALYTICS environment variable to true.

Give Feedback

On this page

  • Couldn't load "librealm-jni.so"
  • Network Calls to Mixpanel