From 08980ff09b69778211a83804d85efca2be2b9510 Mon Sep 17 00:00:00 2001 From: Zhou Weidong <502333560@qq.com> Date: Wed, 21 Oct 2026 19:06:56 +0800 Subject: [PATCH] =?UTF-8?q?docs(readme):=20=E7=94=9F=E4=BA=A7=E5=8C=85?= =?UTF-8?q?=E5=90=88=E5=B9=B6=20arm64-v8a=20=E4=B8=8E=20armeabi-v7a=20?= =?UTF-8?q?=E5=8D=95=E5=8C=85=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 9c2d9cf..076cf36 100644 --- a/README.md +++ b/README.md @@ -137,31 +137,23 @@ flutter run -d \ ## 生产打包(Android) -生产环境只需要以下两个 ABI,不要出通用包: +生产包只包含以下两个 ABI,**打成一个 APK**,不做 split: -| ABI | 适用设备 | 包体参考 | -| --- | --- | --- | -| `arm64-v8a` | 现代手机(64 位) | 约 21MB | -| `armeabi-v7a` | 老 32 位机 | 约 19MB | - -```bash -flutter build apk --release --split-per-abi -# 产出: -# build/app/outputs/flutter-apk/app-arm64-v8a-release.apk -# build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk -``` - -或只打这两个架构的单个 APK: +| ABI | 适用设备 | +| --- | --- | +| `arm64-v8a` | 现代手机(64 位) | +| `armeabi-v7a` | 老 32 位机 | ```bash flutter build apk --release --target-platform android-arm64,android-arm +# 产出单个:build/app/outputs/flutter-apk/app-release.apk(约 37MB) ``` 说明: - `x86_64` 只用于模拟器,不进入生产包。 -- 不要使用 `flutter build apk --release` 出通用包:会把 `arm64-v8a`、`armeabi-v7a`、`x86_64` 三套原生库都打进去,包体约 57MB。 -- 上架应用商店优先用 `flutter build appbundle --release`,由商店按设备下发对应 ABI。 +- 不要直接运行 `flutter build apk --release`:默认会把 `arm64-v8a`、`armeabi-v7a`、`x86_64` 三套原生库都打进去,包体约 57MB。 +- 只有需要进一步压缩单机下载体积时,才考虑 `--split-per-abi` 出分架构包(arm64 约 21MB、armv7 约 19MB),默认不用。 ## 门禁