Not compatible with 16 KB PageSize
With new android studio (Android Studio Narwhal Feature Drop | 2025.1.2 Canary 5), building my app causes a caution that says:
APK app-production-debug.apk is not compatible with 16 KB devices. Some libraries have LOAD segments not aligned at 16 KB boundaries: lib/arm64-v8a/libyuv-decoder.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 found this library uses libyuv-decoder.so, which is not compatible with 16 KB page sizes as mentioned above. Is there a plan on making this library compatible with 16 KB page size? Google says the deadline is 2025/11/1.
I'm working on this too.
@linversion are you working on addressing this problem? is there any timeline you expected this to be published? thanks a lot in advance.
@linversion are you working on addressing this problem? is there any timeline you expected this to be published? thanks a lot in advance.
@maikelvdh check my forked repository: https://github.com/linversion/android-gpuimage
@linversion how i can use your version gpuimage ?
@linversion how i can use your version gpuimage ?
@maikelvdh @re-LIF3 I already published a release aar
In my case, I solved the problem by creating my own OpenGL ES filter library. (It only includes the features necessary for my own Android app, but here it is: https://github.com/house0000/PS_GPU_Android)
So, I will leave this issue. But this issue should be kept open because the problem is not resolved as long as libyuv-decoder.so exists.
I think the solution would be to create a Pull Request that either comments out the functionality handled by libyuv-decoder.so (probably color space conversion) or replaces it with different code. Would anyone be able to create one? I hope so.
@linversion how i can use your version gpuimage ?
@maikelvdh @re-LIF3 I already published a release aar
@linversion it shows checkout release v2.2.0 but the mavencentral url still shows 2.1.0 as latest version how we can download aar? do we have to import as module?
@linversion how i can use your version gpuimage ?
@maikelvdh @re-LIF3 I already published a release aar
@linversion it shows checkout release v2.2.0 but the mavencentral url still shows 2.1.0 as latest version how we can download aar? do we have to import as module?
@soorajlh https://github.com/linversion/android-gpuimage/releases/tag/v2.2.0
The solution to 16KB is very easy, you just need to update all the libraries implemented in this and you just have to set 16KB page size in the CMakeList.txt file and the issue will be resolved. I'm trying to recreate this whole library in kotlin where I run into this problem when I added c++ files in my project, than I added the following line in the CMakeList.txt to resolve the issue
set(CMAKE_ANDROID_ARM64_PAGE_SIZE 16384)
@linversion I am using jetpack.io
I have already added this:
implementation 'com.github.linversion:android-gpuimage:2.2.0'
but gradle can not resolve
@linversion I am using jetpack.io
I have already added this:
implementation 'com.github.linversion:android-gpuimage:2.2.0'but gradle can not resolve @ice6 @soorajlh @maikelvdh @house0000 https://github.com/linversion/android-gpuimage/releases/download/v2.2.0/android-gpuimage-2.2.0.aar
@linversion thank you.
Try out my fork
- https://central.sonatype.com/artifact/io.github.goooler.gpuimage/gpuimage
- https://github.com/Goooler/android-gpuimage
download this library add to your progect and find CMake file, add this line to solve this problem:
target_link_options(yuv-decoder PRIVATE -Wl,-z,max-page-size=0x4000)
target_link_options(yuv-decoder PRIVATE -Wl,-z,max-page-size=0x4000)
That will make all targets support 16 KB page size, including armeabi-v7a and x86. I believe you need
android {
defaultConfig {
externalNativeBuild {
cmake {
// 16 KB page sizes.
arguments '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON'
}
}
}
}
See https://github.com/Goooler/android-gpuimage/pull/9.