From 0610d9877d013bf7f0517ee9d2f7814157382e3e Mon Sep 17 00:00:00 2001 From: lxm <1274844347@qq.com> Date: Fri, 13 Mar 2026 10:37:55 +0800 Subject: [PATCH] =?UTF-8?q?chore(android):=20Google=20Play=E6=B8=A0?= =?UTF-8?q?=E9=81=93=E6=9E=84=E5=BB=BA=E6=97=B6=E6=8E=92=E9=99=A4=E9=AB=98?= =?UTF-8?q?=E5=BE=B7=E5=9C=B0=E5=9B=BE.so=E4=BB=A5=E6=BB=A1=E8=B6=B316KB?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AF=B9=E9=BD=90=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根据.env中Channel=GLOBAL_GOOGLE自动排除libAMapSDK*.so, 高德SDK尚未发布支持16KB页面对齐的版本,海外版本不使用高德功能。 Co-Authored-By: Claude Opus 4.6 --- android/app/build.gradle.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 16798fdab..6599a0b8a 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -57,6 +57,16 @@ android { } jniLibs { useLegacyPackaging = true + // Google Play 渠道排除高德地图 .so(尚未支持 16KB 页面对齐) + val envFile = rootProject.file("../.env") + if (envFile.exists()) { + val channel = envFile.readLines() + .firstOrNull { it.trim().startsWith("Channel=") } + ?.substringAfter("=")?.trim() + if (channel == "GLOBAL_GOOGLE") { + excludes += setOf("**/libAMapSDK*.so") + } + } } }