Skip to content

Google Play's 16 KB page size requirements #94

@simonecorsato

Description

@simonecorsato

Google Play's 16 KB page size requirements must be fulfilled starting from 1st November.
I currently get the following warning:

APK app-SwingMobile-debug.apk is not compatible with 16 KB devices. Some libraries have LOAD segments not aligned at 16 KB boundaries:
lib/arm64-v8a/libnode.so
lib/arm64-v8a/libnodejs-mobile-react-native-native-lib.so
Starting November 1st, 2025, all new apps and updates to existing apps submitted to Google Play and targeting Android 15+ devices must support 16 KB page sizes. For more information about compatibility with 16 KB devices, visit developer.android.com/16kb-page-size.

I managed to fix the "lib/arm64-v8a/libnodejs-mobile-react-native-native-lib.so" issue in the build.gradle

android
      defaultConfig {
         externalNativeBuild {
             cmake {
-                cppFlags ""
+                // Enable 16KB page size for Android (NDK r27+)
+                arguments "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
                 if(!_isCorrectSTLDefinedByApp) {
                     arguments "-DANDROID_STL=c++_shared"
                 }

but we also need correct versions of the lib/arm64-v8a/libnode.so libraries to get rid also of the other issue.
Can anyone help me on how to generate this libnode.so with 16KB support ?

Anyway an update of the library is required with a fix before the 1st of November or we will not be able to submit or update apps in google play store.

@staltz I saw that the library changed how the libraries are built. I see that they appear in libnode/bin folder when the library Is installed in a project., but I don't get where is the configuration that is used to build them.

Thanks a lot for you support

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions