libpdfiumandroid.so not 16 KB aligned – Google Play 16 KB page-size requirement
Google Play now requires all native libraries to support 16 KB memory page-size alignment (mandatory for updates from Nov 1, 2025).
When analyzing my APK built with react-native-pdf, I found that:
- base/lib/arm64-v8a/libpdfiumandroid.so
- base/lib/x86_64/libpdfiumandroid.so
are still built with 4 KB alignment instead of 16 KB.
This causes Google Play Console warnings and will block publishing on newer devices.
Steps to reproduce:
- Build app with
react-native-pdf - Analyze APK/AAB → check
libpdfiumandroid.so - Shows
Align 0x1000 (4096)instead of requiredAlign 0x4000 (16384)
Expected behavior:
libpdfiumandroid.so should be rebuilt with NDK r28+ to support 16 KB alignment.
Please update the bundled binaries so apps using this library can pass Google Play compliance.
+1
+1
+1
This was fixed in this PR: https://github.com/wonday/react-native-pdf/pull/950
It is merged to the master branch but has not been released in a new package version.
It you cannot wait for a new version you can use patch-package to apply the diff from the PR yourself.
The current master branch raises errors (related comment - https://github.com/wonday/react-native-pdf/commit/b0b074fc60c86c4f2e10deab6676d7c2a15be43d#commitcomment-164691008).
- Using io.legere:pdfiumandroid:1.0.33 throws error java.lang.IllegalArgumentException: source must not be null
- And another error is 'The binary version of its metadata is 2.0.0, expected version is 2.2.0'. Upgrading Kotlin to 2.2.x is not possible, since many React Native libraries still depend on 2.0.x.
Can someone tell what can be done in this case? Upgrading the library is a necessity to support Android's 16 KB requirement.
Same issue here
+1
here a patch file with the latest changes from version 6.7.7 to commit b0b074f
for now until we'll get an npm release 🙄
What is the release schedule of versions? If the patch is already available and it's only a upload. I am sure that you know about the current situation, that google play is forcing new apps to comply to the 16KB requirement and existing apps the following months. Would save the hassle of applying the patch manually
I'm not the maintainer, I have the same issue as you so Iv'e created a patch and shared it. you don't have to manually install the patch, use patch-package.
here a patch file with the latest changes from version 6.7.7 to commit b0b074f
for now until we'll get an npm release 🙄
Is there a way to come up with a fix that does not require kotlin 2.2.0? Cant make it work with react native 0.77
From what i am seeing implementation 'io.legere:pdfiumandroid:1.0.32' is enough, 1.0.33 is not needed for the 16KB..and 1.0.32 still depends on kotlin 2.0.21
@nes123 cool so just edit the patch file for your needs.
From what i am seeing implementation 'io.legere:pdfiumandroid:1.0.32' is enough, 1.0.33 is not needed for the 16KB..and 1.0.32 still depends on kotlin 2.0.21
The PDFiumandroid 1.0.33 does have a fix for some crashes see https://github.com/wonday/react-native-pdf/pull/957#issue-3304458049
Same issue. Any update on this?
From what i am seeing implementation 'io.legere:pdfiumandroid:1.0.32' is enough, 1.0.33 is not needed for the 16KB..and 1.0.32 still depends on kotlin 2.0.21
The PDFiumandroid 1.0.33 does have a fix for some crashes see #957 (comment)
APK Analyzer gave warnings Root cause:
- Native libraries precompiled with 4 KB pages
PdfiumAndroid ships .so files (libmodpdfium.so, libmodpng.so, libmodft2.so, libjnipdfium.so).
These were built with 4 KB memory page alignment, but Android 15+ requires 16 KB compatibility.
- Dependency chain App → [email protected] → [email protected] → precompiled native libs
So the warnings show up because react-native-pdf depends on PdfiumAndroid, which hasn’t been rebuilt with 16 KB support yet.
+1
Is this library still being maintained or do we need to start looking at forking / switching to another library?
Is this library still being maintained or do we need to start looking at forking / switching to another library?
I don't know bro, but it's been like this for a while
8 months since the latest release is quite long, isn't it?