how to enable 16KB page size on c++ android app using qmake
-
Hello,
about 2 months ago i have programmed an app which currently uses the old standard 4KB page size, but now google changes the standard to 16KB in 2026, so my question is how can i change my app to use 16KB page size instead of 4KB?I am using Qt 6.6.3 with qmake.
i have already looked around and found this post:
https://forum.qt.io/topic/162567/solved-update-on-android-15-new-page-size-memory-16kbi tried the flag aswell and installed the app on a 16KB emulator, but when i try to start the app it tells me that the app is not a 16KB page size app and it crashes.
Do you know any way to enable 16KB page size?
Thanks yall for your responses!!
-
Hello,
about 2 months ago i have programmed an app which currently uses the old standard 4KB page size, but now google changes the standard to 16KB in 2026, so my question is how can i change my app to use 16KB page size instead of 4KB?I am using Qt 6.6.3 with qmake.
i have already looked around and found this post:
https://forum.qt.io/topic/162567/solved-update-on-android-15-new-page-size-memory-16kbi tried the flag aswell and installed the app on a 16KB emulator, but when i try to start the app it tells me that the app is not a 16KB page size app and it crashes.
Do you know any way to enable 16KB page size?
Thanks yall for your responses!!
@Qt-User0307 said in how to enable 16KB page size on c++ android app using qmake:
i tried the flag aswell and installed the app on a 16KB emulator, but when i try to start the app it tells me that the app is not a 16KB page size app and it crashes.
How did you try to add the flags to qmake? Can you show the line you added?
-
From what I gathered,
updating your ndk to 27+ (29 is the latest stable release) should auto enable the 16k page option
-
NDK version 28 supports it by default. For android 27 I just add this in my gradle file.
externalNativeBuild { cmake { cppFlags '-std=c++23' arguments "-DCMAKE_VERBOSE_MAKEFILE=ON", '-DANDROID_STL=c++_shared', "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON" } }
The important bit is ANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES
For ndk less than 27 I would seek out what google says. As of right now, it doesn't look like the Qt libraries for 6.9.2 support it yet anyways.