From 60ead3df3d0cdd061de5993bd2734b8aba6d4108 Mon Sep 17 00:00:00 2001 From: William Date: Mon, 9 Mar 2026 11:32:26 +0000 Subject: [PATCH] fix: align ELF LOAD segments to 16KB for Android 15+ compatibility Android 15 introduces support for 16KB memory page sizes. Native libraries built with the default 4KB max-page-size fail to load on these devices and are rejected by Google Play Console. Adding -Wl,-z,max-page-size=16384 to LOCAL_LDFLAGS ensures the linker aligns LOAD segments to 16KB, which is backward-compatible with 4KB devices. Co-Authored-By: Claude Opus 4.6 --- opus_flutter_android/android/Android.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/opus_flutter_android/android/Android.mk b/opus_flutter_android/android/Android.mk index 47ce737..30615c9 100644 --- a/opus_flutter_android/android/Android.mk +++ b/opus_flutter_android/android/Android.mk @@ -72,4 +72,5 @@ ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI), x86 x86_64)) endif endif +LOCAL_LDFLAGS += -Wl,-z,max-page-size=16384 include $(BUILD_SHARED_LIBRARY) \ No newline at end of file