Skip to content
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

Support Android 15 for 16 KB page sizes #17702

Open
zhitaocai opened this issue Oct 11, 2024 · 3 comments
Open

Support Android 15 for 16 KB page sizes #17702

zhitaocai opened this issue Oct 11, 2024 · 3 comments
Assignees
Labels
Env: Android Env: Native General issue on all native platforms including iOS, Android, MacOS, Windows Feature Request P1 Must be finished in the milestone
Milestone

Comments

@zhitaocai
Copy link

Use Case

Android 15 has been released!

Problem Description

Android 15 has been released!

It is estimated that it will become the minimum adaptation requirement for listing on Google Play in the near future.

It is observed that there is a support requirement for 16 KB Page Size in the update information. I hope the engine team can pay attention to the relevant content, including but not limited to

  1. Whether it is necessary to upgrade the NDK version to r27

  2. Whether it is necessary to upgrade AGP to 8.3+

Proposed Solution

No response

How it works

No response

Alternatives Considered

In addition, Android 15 has other updates, you can also check whether it is adapted~

Additional Information

No response

@zhitaocai zhitaocai added Feature Request Needs Triage Needs to be assigned by the team labels Oct 11, 2024
@minggo minggo added Env: Android Env: Native General issue on all native platforms including iOS, Android, MacOS, Windows and removed Needs Triage Needs to be assigned by the team labels Oct 17, 2024
@minggo minggo added this to the 3.8.5 milestone Oct 17, 2024
@bofeng-song
Copy link
Contributor

bofeng-song commented Oct 18, 2024

Cocos third library need to recompile, such as: v8

NDK below 26:
LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"

Android NDK r27 and higher
To support compiling 16 KB-aligned shared libraries with Android NDK version r27 and higher, you need to update your ndk-build, build.gradle, build.gradle.kts, or linker flags as follows:

In your Application.mk:

APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true

AGP below 8.3:
If you can't upgrade AGP to version 8.5.1 or higher, then the alternative is to switch to use compressed shared libraries. Update your Gradle configuration to have Gradle compress your shared libraries when packaging your app to avoid app installation issues with unaligned shared libraries.

In your build.gradle file, add the following option:

android {
...
packagingOptions {
jniLibs {
useLegacyPackaging true
}
}
}

@zhitaocai
Copy link
Author

Is this a relevant adaptation guide for developers?

Or will the engine team merge these relevant adaptations into the engine and release it in a future version?

@bofeng-song
Copy link
Contributor

We'll adapt it as soon as possible

@minggo minggo added the P1 Must be finished in the milestone label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Env: Android Env: Native General issue on all native platforms including iOS, Android, MacOS, Windows Feature Request P1 Must be finished in the milestone
Projects
None yet
Development

No branches or pull requests

3 participants