How to adapt to Android 15? android : https://developer.android.google.cn/guide/practices/page-sizes?hl=zh-cn#build WechatIMG16047

Comment From: dr2chase

The English version of that page: https://developer.android.google.cn/guide/practices/page-sizes#build

@hyangah is this something you know?

Comment From: TikBai

I've solved this problem here, and before I can execute gomobile, I need to execute the environment variables below. export CGO_LDFLAGS="-Wl,-z,max-page-size=16384"

Comment From: a365344743s

I've solved this problem here, and before I can execute gomobile, I need to execute the environment variables below. export CGO_LDFLAGS="-Wl,-z,max-page-size=16384"

NDK version r28 and higher compile 16 KB-aligned by default so just update ndk to r28

Comment From: arjenveenhuizen

I've solved this problem here, and before I can execute gomobile, I need to execute the environment variables below. export CGO_LDFLAGS="-Wl,-z,max-page-size=16384"

NDK version r28 and higher compile 16 KB-aligned by default so just update ndk to r28

I did that, but it did not solve the problem. Although the resulting binary was claimed to be aligned by the check_elf_aligment script, in practice the library was still having a 4KB LOAD section alignment.

This was only resolved by (also) setting export CGO_LDFLAGS="-Wl,-z,max-page-size=16384".