Help for Realm® apps / Build errors

Realm and Google Play's 16 KB page size requirement

From 1 February 2027, Google Play will not let you release app updates that do not support 16 KB memory pages. In May 2026, a Realm user reported librealm.so flagged in Play Console.

Updated 9 November 2026.

What you see

In #7129 (May 2026, realm ^20.2.0, React Native 0.79.6), Play Console flagged these native libraries as not compatible with 16 KB page sizes:

libdatastore_shared_counter.so
librealm.so

When it happens

  • Android 15 and later can run with 16 KB memory pages. Every native library (.so file) in your app must support them. Google's guide gives the deadline and the checks.
  • realm added 16 KB support in 20.2.0 (changelog, 11 August 2025). Older versions do not have it. The same changelog says to enable legacy packaging if you use Android Gradle Plugin 8.5 or lower.
  • Watch out: the npm deprecation message on realm 10, 11 and 12 tells you to install realm@community. On npm, that tag points to 20.1.0, which does not have 16 KB support. The latest release is 20.2.0.
  • #7129 still reports a warning with 20.2.0. We have not found why.

Fix with afterdb

In afterdb, librealm.so is built with your app's NDK.

In package.json, point the two Realm packages to afterdb:

"realm": "npm:@pomwik/afterdb@20.3.0",
"@realm/react": "npm:@pomwik/afterdb-react@0.20.1"

Then reinstall, run pod install on iOS, and rebuild. For Expo dev builds, run npx expo prebuild --clean. Your code keeps import Realm from "realm". If you do not use @realm/react, the first line is enough.

afterdb is an independent open-source fork of the realm-js SDK v20 (Apache-2.0) that we maintain, for apps on realm 20.x without Device Sync. It is not an official Realm release. Code on GitHub, package on npm.

In our test app, all 24 of the 64-bit native libraries are 16 KB aligned and zipalign -P 16 passes. The app runs on an Android 16 emulator with 16 KB pages (in CI and locally), and so do React Native 0.86.3 and 0.87.1 and Expo SDK 56, 57 and 58 (locally). Not tested yet: real devices.

To check your own APK or AAB, the afterdb repository has a script that checks every 64-bit .so file and runs zipalign -P 16 when zipalign is installed:

node scripts/check-16kb.mjs app-release.apk

afterdb only changes the Realm library. Other flagged libraries need a fix from the dependency that ships them.

Without afterdb

  • Use realm 20.2.0, not realm@community, and check your APK with the tools in Google's guide. #7129 still reports a warning on 20.2.0, so check the result.

Need help? Send your versions and the full error for a free 15-minute check. We reply within 12 hours.