Skip to content

Prepare android sdk to support 16 KB page size #1358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dimskom
Copy link

@dimskom dimskom commented Jul 14, 2025

Prepare android sdk to support 16 KB page size compatibility requirement when targeting Android 15+
https://developer.android.com/guide/practices/page-sizes

Added this flag DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON and updated the ndk version for the build
New NDK version is required for supporting the flag
#1348

@dimskom dimskom requested a review from a team as a code owner July 14, 2025 13:16
@dimskom dimskom requested a review from Copilot July 14, 2025 13:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Android SDK configuration to use a newer NDK version (29.0.13599879), bump the target SDK to API 31, and introduce support for flexible page sizes when targeting Android 15+.

  • Bumped default NDK from 21.4 to 29.0 and targetSdkVersion from 29 to 31
  • Added -DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON CMake flag
  • Updated scripts, docs, and workflows to reference the new NDK version and manifest exported attribute

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/android_build/tools.gradle Bumped ndkVersion and targetSdkVersion defaults
lib/android_build/maesdk/build.gradle Added -DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON to CMake args
lib/android_build/ide.cmd Updated default %ANDROID_NDK_VERSION%
lib/android_build/app/src/main/AndroidManifest.xml Added android:exported="true" to MainActivity for API 31+
docs/cpp-start-android.md Updated documented default NDK version
build-android.cmd Updated default %ANDROID_NDK_VERSION%
.github/workflows/codeql-analysis.yml Updated sdkmanager NDK version
.github/workflows/build-android.yml Updated sdkmanager NDK version
Comments suppressed due to low confidence (1)

docs/cpp-start-android.md:25

  • [nitpick] Update the documentation to include a note about the new DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES flag, explaining its purpose and how to enable it when targeting Android 15+.
set "ANDROID_NDK_VERSION=29.0.13599879"

@lalitb
Copy link
Contributor

lalitb commented Jul 16, 2025

@dimskom @anod Not an expert here, but I see new warnings with the NDK version in the CI build logs:

C/C++: Ignoring invalid ABI 'riscv64' found in ABI metadata file 'C:\Android\android-sdk\ndk\29.0.13599879\meta\abis.json'.
WARNING:C/C++: Ignoring invalid ABI 'riscv64' found in ABI metadata file 'C:\Android\android-sdk\ndk\29.0.13599879\meta\abis.json'.

Is this expected, or something else needs to be changed?

@dimskom
Copy link
Author

dimskom commented Jul 23, 2025

@dimskom @anod Not an expert here, but I see new warnings with the NDK version in the CI build logs:

C/C++: Ignoring invalid ABI 'riscv64' found in ABI metadata file 'C:\Android\android-sdk\ndk\29.0.13599879\meta\abis.json'.
WARNING:C/C++: Ignoring invalid ABI 'riscv64' found in ABI metadata file 'C:\Android\android-sdk\ndk\29.0.13599879\meta\abis.json'.

Is this expected, or something else needs to be changed?
The SDK is not supporting riscv64 architecture, but preliminary support for riscv64 was added in the NDK, that's why the warning is

@dimskom
Copy link
Author

dimskom commented Jul 23, 2025

@lalitb The builds are failing because of deprecated windows 2019 image, what do you suggest?

@ThomsonTan
Copy link
Contributor

@lalitb The builds are failing because of deprecated windows 2019 image, what do you suggest?

Since the change is not targeting Windows, I think the Windows CI failure can be ignored for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants