androidandroid-ndkandroid-15

Supporting 16kb page size in an Android app not using NDK


We are preparing ourselves to support Android 15 and according to official docs,

Android supports devices that are configured to use a page size of 16 KB (16 KB devices). If your app uses any NDK libraries, either directly or indirectly through an SDK, then you will need to rebuild your app for it to work on these 16 KB devices.

A dedicated page explain necessary steps to support 16 KB devices but honestly I'm confused. We don't use NDK and only few .so files are present in the final APK by the third party libraries (Chief among them com.github.barteksc:pdfium-android). Should we build these libraries our self? How can I find that these third party .so files don't use 4KB page size? Since I'm not familiar with native development in Android, simple explanations would be appreciated.

We use AGP 8.3 and default settings for uncompressed shared libraries


Solution

  • It seems like the library you use has stopped development. https://github.com/barteksc/PdfiumAndroid -> last commit 6 years ago.
    Most likely the library will not be updated.
    Your options are

    1. Wait for the maintainer to update the project
    2. Wait for somebody else to update the project
    3. Do it yourself
    4. Switch to an actively maintained pdf library

    You can test your app in an 16kb emulator.
    The Android team described the process here: https://developer.android.com/guide/practices/page-sizes#test