Flutter 生成的 3 个 APK 有什么区别? [英] What is the difference between 3 APKs generated from flutter?

查看:58
本文介绍了Flutter 生成的 3 个 APK 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要了解 Android 设备架构,以及为什么在我使用时会生成三种不同类型的 APK:

I need to understand the Android device architecture and, Why there is three different types of APKs are generated when I use:

flutter build apk --split-per-abi.

当我使用

flutter build apk

我得到一个名为 fat APK 的大型 APK 文件,其中包含该应用的 3 个版本.

I get a large APK file called fat APK contains the 3 versions of the app.

推荐答案

flutter build apk --split-per-abi 命令通常会生成两个 APK 文件.

The command flutter build apk --split-per-abi typically generates two APK files.

  1. arm64 或 x86_64 是具有 64 位处理器的设备的 apk 文件.
  2. x86 是 32 位处理器的 apk 文件.
  1. arm64 or x86_64 is the apk file for devices having 64-bit processors.
  2. x86 is the apk file for 32-bit processors.

您可以将它们都上传到 PlayStore,并根据用户的设备架构安装相应的 apk.

You can upload both of them on the PlayStore and based on the user's device architecture the corresponding apk will be installed.

您在使用 flutter build apk 时获得的胖 apk 包含必要的编译代码,以针对所有应用程序二进制接口或 ABI.一旦用户下载了这个胖 apk,那么只会使用适用于该设备的代码.

The fat apk that you are getting while using the flutter build apk contains the necessary compiled code to target all the Application Binary Interfaces or ABIs. Once a user downloads this fat apk, then only the code applicable to the device will be used.

这篇关于Flutter 生成的 3 个 APK 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆