DEV Community

Dainy Jose
Dainy Jose

Posted on • Edited on

๐Ÿž Troubleshooting 16 KB Page Size Issues

๐Ÿ“– This article is a continuation of my previous post: Understanding Google Playโ€™s 16 KB Page Size Requirement for Android Apps.

If you havenโ€™t read it yet, I recommend starting there for the full context.


Even after updating your SDK/NDK, you might hit issues when testing.
Here are the most common errors and fixes:


โŒ Error: INSTALL_FAILED_INVALID_APK: unsupported ELF page size

Cause: Your native libraries (.so files) are built only for 4 KB pages, not 16 KB.

Fix:

  • Update NDK to r26+ (older versions donโ€™t support 16 KB)**.
sdkmanager "ndk;26.1.10909125"
Enter fullscreen mode Exit fullscreen mode
  • In android/gradle.properties, set:
ANDROID_NDK_VERSION=26.1.10909125
Enter fullscreen mode Exit fullscreen mode
  • Clean and rebuild:
./gradlew clean assembleRelease
Enter fullscreen mode Exit fullscreen mode

โŒ Error: ELF header missing or corrupted when checking with readelf

Cause: The .so file you extracted isnโ€™t valid or was compressed.

Fix:

  • Re-extract from the APK using:
unzip app-release.apk -d extracted_apk
Enter fullscreen mode Exit fullscreen mode
  • Navigate to lib/arm64-v8a/ before running readelf.

โŒ Error: App runs on emulator but crashes on physical device (Android 15)

Cause: Some third-party SDKs or libraries bundled in your app may not yet support 16 KB page sizes.

Fix:

  • Identify the crashing .so file from logs (adb logcat).

  • Update the dependency to the latest version (check release notes for 16 KB support).

  • If no update exists, contact the libraryโ€™s maintainer or temporarily remove it.


โŒ Error: Your app must support 16 KB page sizes in Google Play Console (even after rebuild)

Cause: Google Play still detects non-compliant native libraries inside your AAB.

Fix:

  • Run a full check with:
bundletool build-apks --bundle=app-release.aab --output=output.apks
unzip output.apks -d apks
find apks -name "*.so" | xargs -I {} readelf -h {} | grep "Page size"
Enter fullscreen mode Exit fullscreen mode
  • Confirm all .so files show 16384.

  • If one still shows 4096, update/rebuild that library.


โœ… Best Practice: Always use the latest versions of:

  • Android Gradle Plugin (8.5+)

  • NDK (26+)

  • compileSdkVersion & targetSdkVersion = 35

This ensures forward compatibility with Android 15+ and avoids Play Store rejection.


โœ๏ธ Written by Dainy Jose โ€” Mobile App Developer specialized in React Native and the MERN stack.

๐Ÿ’ผ Skills & Tools:

Mobile App Dev | MERN Stack | React Native | TypeScript | Redux | React.js | Node.js | MongoDB | MySQL | Express.js | REST API | JWT | Google Maps | Firebase | Jest | Agile | SDLC | Payments | Git | Bitbucket | Jira

๐Ÿ“ฌ Connect with me:

๐Ÿ”— LinkedIn
๐Ÿ’ป GitHub
๐ŸŒ Portfolio

Top comments (0)