[Android] Please add support for 16 KB memory page sizes (Google Play requirement)
Summary
Starting November 1, 2025, Google Play will block updates for apps that donβt support devices with 16 KB memory page sizes.
Our app uses this library (react-native-pdf) and Play Console shows the following when uploading our bundle:
Memory page size: Does not support 16 KB Libraries that do not support 16 KB: base/lib/arm64-v8a/libpdfiumandroid.so base/lib/x86_64/libpdfiumandroid.so
Why this matters
Google announced that apps targeting Android 15+ must support 16 KB page sizes:
- Prepare your Play app for devices with 16 KB page sizes
- From Nov 1, 2025, updates will be blocked if native libraries are not 16 KB-ready.
Request
Could you please:
- Rebuild
libpdfiumandroid.sowith NDK r27+ and enable the Gradle flag:
android.enable16kPages=true
- Release an updated version that includes 16 KB page size support.
Thanks a lot for maintaining this library!
Hey @zcodev97 , have you tried to override the pdfiumandroid via gradle overrides?
also, can you point to the documentation where you found this flag?
android.enable16kPages=true
also me with this issue
Just upgrade pdfium-android to 1.0.33 in build.gradle. Works for me.
Just upgrade pdfium-android to 1.0.33 in build.gradle. Works for me.
Can you please explain how you did this?
also me with this issue , Starting November 1, 2025, Google Play will block updates for apps that donβt support devices with 16 KB memory page sizes.
Our app uses this library (react-native-pdf) and Play Console shows the following when uploading our bundle:
Memory page size: Does not support 16 KB Libraries that do not support 16 KB: base/lib/arm64-v8a/libpdfiumandroid.so base/lib/x86_64/libpdfiumandroid.so
16KB support has been added to master, however I had issues building from master HEAD.
My bundle has passed all checks by pinning to this commit.
"dependencies": {
"react-native-pdf": "git+https://github.com/wonday/react-native-pdf.git#b0b074fc60c86c4f2e10deab6676d7c2a15be43d",
}
Hey @zcodev97 , have you tried to override the
pdfiumandroidvia gradle overrides?also, can you point to the documentation where you found this flag?
android.enable16kPages=true
I tried, it shows C++ Error
Just upgrade pdfium-android to 1.0.33 in build.gradle. Works for me.
Can you please explain how you did this?
using react native release bundle then upload it to google play console, it shows error of 16KB from this library
base/lib/arm64-v8a/libpdfiumandroid.so base/lib/x86_64/libpdfiumandroid.so
Hi @zcodev97 and maintainers, I've successfully implemented a complete solution for the Google Play 16KB page size requirement. For developers who need immediate compliance while waiting for the official fix, I've published react-native-pdf-jsi which is a drop-in replacement that fully supports 16KB page sizes. β Google Play 16KB Compliance Implemented: Built with NDK r27+ and latest Android Gradle Plugin 8.2.2 Configured with android.enable16kPages=true and android.native.16kPage=true CMake setup with ANDROID_PAGE_SIZE_AGNOSTIC=ON and ANDROID_16KB_PAGES=ON Includes check16KBSupport() method to verify compliance status π Additional Benefits: JSI integration for up to 80x faster performance Lazy loading and smart caching for large PDF files Drop-in replacement - minimal code changes required Production-ready and already powering apps π¦ Package Details: npm: react-native-pdf-jsi (https://www.npmjs.com/package/react-native-pdf-jsi) GitHub: https://github.com/126punith/react-native-enhanced-pdf Current version: 2.1.0 π§ Migration: This provides an immediate solution for developers facing the November 2025 deadline while maintaining compatibility with existing code.
@126punith This library also doesn't seems to be working as i see in the Android Studio apk analyzer:
I got this resolved by doing the following:
- Update NDK in Android Studio to 28.2.13676358
- In android\build.gradle update ndkVersion to 28.2.13676358
- In \node_modules\react-native-pdf\android\build.gradle replace implementation 'io.legere:pdfiumandroid:1.0.19' with implementation 'io.legere:pdfiumandroid:1.0.32'
- In \node_modules\react-native-pdf\android\build.gradle replace implementation 'com.google.code.gson:gson:2.8.5' with implementation 'com.google.code.gson:gson:2.11.0'
- Rebuild and you should be good
I was able to release updates again after doing the above.
Thanks @IsengardZA it worked for me
Hi @AshishRnDev
Thank you for testing the library! I understand you're seeing issues in Android Studio's APK analyzer. The good news is that @IsengardZA has already found and shared the exact solution for the 16KB page size issues!
π Your package already includes ALL the fixes!
Looking at react-native-pdf-jsi, it already implements every solution @IsengardZA mentioned:
β
NDK Version: Uses ndkVersion "28.2.13676358 " β
Dependencies: Already updated to io.legere:pdfiumandroid:1.0.32andcom.google.code.gson:gson:2.11.0`
β
Build Configuration: Properly configured for 16KB page size support with all required flags
π If you're still experiencing issues, please provide:
- APK Analyzer Details: What specific issues are you seeing?
- Build Configuration: Debug vs Release, target architecture, build logs
- Error Messages: Any specific warnings or errors
π οΈ Quick Troubleshooting:
-
Clean Build:
cd android && ./gradlew clean cd .. && npx react-native run-android -
Verify Installation:
npm list react-native-pdf-jsi -
Check ProGuard: Ensure ProGuard rules are configured for release builds
π Migration Advantage:
Instead of manually patching the old react-native-pdf (as @IsengardZA did), developers can simply use your react-native-pdf-jsi package which:
- β Has all fixes pre-configured
- β Includes 16KB page size compliance
- β Provides JSI performance benefits (up to 80x faster)
- β Is future-proof with latest NDK r28
π¦ Quick Migration:
npm uninstall react-native-pdf
npm install react-native-pdf-jsi
π For Faster Resolution:
If issues persist, please share:
- Screenshots of APK analyzer issues
- Build logs with errors
- Your
android/app/build.gradleconfiguration
The library is actively maintained and I'm committed to resolving any compatibility issues quickly. Thanks to @IsengardZA for sharing the solution - it confirms our package is ahead of the curve! π
Using implementation("io.legere:pdfiumandroid:1.0.34") in this package should resolve the build, crash and 16kb issues.
My patch:
diff --git a/node_modules/react-native-pdf/android/build.gradle b/node_modules/react-native-pdf/android/build.gradle
index 3dfe1dc..03bab08 100644
--- a/node_modules/react-native-pdf/android/build.gradle
+++ b/node_modules/react-native-pdf/android/build.gradle
@@ -126,6 +126,6 @@ dependencies {
// The repo from zacharee is based on PdfiumAndroidKt, a much newer fork of PdfiumAndroid, with better maintenance and updated native libraries.
implementation 'com.github.zacharee:AndroidPdfViewer:4.0.1'
// Depend on PdfiumAndroidKt directly so this can be updated independently of AndroidPdfViewer as updates are provided.
- implementation 'io.legere:pdfiumandroid:1.0.24'
- implementation 'com.google.code.gson:gson:2.8.5'
+ implementation 'io.legere:pdfiumandroid:1.0.34'
+ implementation 'com.google.code.gson:gson:2.13.2'
}
my solution was make download file, after shared with user
v7.0.0 released, If you find any issues, please contact me.
@wonday Using React Native 0.81.4 with newArchEnabled=true. Android build fails after installing v7.0.0.
Below is the error that was occurring before this fix:
- cannot find symbol: ParcelFileDescriptor, PdfRenderer, IOException in PdfView.java
- duplicate method setEnableRTL() in PdfManager.java
- PdfManager does not override setShowsVerticalScrollIndicator(PdfView, boolean)
node_modules/react-native-pdf/android/src/main/java/org/wonday/pdf/PdfView.java:294: error: cannot find symbol
ParcelFileDescriptor fileDescriptor = ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
node_modules/react-native-pdf/android/src/main/java/org/wonday/pdf/PdfView.java:295: error: cannot find symbol
PdfRenderer pdfRenderer = new PdfRenderer(fileDescriptor);
node_modules/react-native-pdf/android/src/main/java/org/wonday/pdf/PdfView.java:313: error: cannot find symbol
} catch (IOException e) {
node_modules/react-native-pdf/android/src/main/java/org/wonday/pdf/PdfManager.java:143: error: method setEnableRTL(PdfView,boolean) is already defined in class PdfManager
public void setEnableRTL(PdfView view, boolean value) {
node_modules/react-native-pdf/android/src/main/java/org/wonday/pdf/PdfManager.java:29: error: PdfManager is not abstract and does not override abstract method setShowsVerticalScrollIndicator(PdfView,boolean) in RNPDFPdfViewManagerInterface
Temporary Fix for Android build errors for RN 0.81.4 with react-native-pdf v7
Changes:
- Added missing imports in PdfView.java
- Removed duplicate setEnableRTL() in PdfManager.java
- Implemented setShowsVerticalScrollIndicator() in PdfManager.java
--- PdfView.java 2025-10-08 23:36:01
+++ node_modules/react-native-pdf/android/src/main/java/org/wonday/pdf/PdfView.java 2025-10-08 23:45:03
@@ -56,6 +56,10 @@
import com.google.gson.Gson;
import org.wonday.pdf.events.TopChangeEvent;
+
+import android.os.ParcelFileDescriptor;
+import android.graphics.pdf.PdfRenderer;
+import java.io.IOException;
public class PdfView extends PDFView implements OnPageChangeListener,OnLoadCompleteListener,OnErrorListener,OnTapListener,OnDrawListener,OnPageScrollListener, LinkHandler {
private int page = 1; // start from 1
--- PdfManager.java 2025-10-08 23:59:37
+++ node_modules/react-native-pdf/android/src/main/java/org/wonday/pdf/PdfManager.java 2025-10-09 00:26:35
@@ -99,6 +99,11 @@
// NOOP on Android
}
+ @Override
+ public void setShowsVerticalScrollIndicator(PdfView view, boolean value) {
+ // NOOP on Android
+ }
+
@ReactProp(name = "enableRTL")
public void setEnableRTL(PdfView view, boolean enableRTL) {
pdfView.setEnableRTL(enableRTL);
@@ -139,11 +144,6 @@
pdfView.setEnablePaging(enablePaging);
}
- @Override
- public void setEnableRTL(PdfView view, boolean value) {
- // NOOP on Android
- }
-
@ReactProp(name = "fitPolicy")
public void setFitPolicy(PdfView pdfView, int fitPolicy) {
pdfView.setFitPolicy(fitPolicy);
@@ -162,7 +162,7 @@
}
@Override
- public void receiveCommand(@NonNull PdfView root, String commandId, @androidx.annotation.Nullable ReadableArray args) {
+ public void receiveCommand(@NonNull PdfView root, String commandId, @Nullable ReadableArray args) {
Assertions.assertNotNull(root);
if ("setNativePage".equals(commandId)) {
Assertions.assertNotNull(args);
@@ -176,5 +176,4 @@
super.onAfterUpdateTransaction(pdfView);
pdfView.drawPdf();
}
-
}
please try v7.0.1 again
v7.0.1 works fine with React Native 0.81.4 and newArchEnabled=true. Thanks!