16 KB memory page size for Unity3D Android project

Hello.

We have a technical issue with the cesium native library. It must be compiled with new 16 KB memory page size. It will block to deploy application to the Google Play store from 1 Nov 2025.

We have the strong warning:

”APK launcher-debug.apk is not compatible with 16 KB devices. Some libraries have LOAD segments not aligned at 16 KB boundaries:

lib/arm64-v8a/libCesiumForUnityNative-Runtime.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.”

Thank you.

Hello.

I found a quick solution. We need manually integrating the cesium library to your project like that:

https://cesium.com/learn/cesium-unity/ref-doc/developer-setup.html

add 2 lines to native~/CMakeLists.txt file in the end of the “if android section”:

if (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
set(HTTPLIB_USE_OPENSSL_IF_AVAILABLE OFF)
set(ANDROID_ABI ${CMAKE_ANDROID_ARCH_ABI})
set(ANDROID_NDK ${CMAKE_ANDROID_NDK})
# add lines here:
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,max-page-size=16384")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,max-page-size=16384")
endif()

Compile the library (did with macos):

cd your-unity-project/Packages/com.cesium.unity/
dotnet publish Reinterop~ -o .

export UNITY="/Applications/Unity/Hub/Editor/{unity_version}/Unity.app/Contents/MacOS/Unity"

Compile the android target:

cd your-unity-project/Packages/com.cesium.unity/native~/

cmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build -j14 --target install --config RelWithDebInfo
/Applications/Unity/Hub/Editor/{unity_version}/Unity.app/Contents/MacOS/Unity -batchmode -nographics -projectPath {your_root_path_to_unity_project} -buildTarget Android -executeMethod CesiumForUnity.BuildCesiumForUnity.CompileForAndroidAndExit -logFile {path_to_log_file.log}
  1. {unity_version} - replace your unity version
  2. {your_root_path_to_unity_project} - replace with your root path to the unity project
  3. {path_to_log_file.log} - replace log file

But it will very good if the developers do the fix in the official library version.

I hope if it was helpful for you.

I wrote an issue for this:

Thanks for reporting this @N42Game, and for sharing the details of your solution!