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

查看:303
本文介绍了颤动生成的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为您带来了很大的apk,因为

flutter build apk gives you large apk because,

flutter build apk会生成一个胖APK,其中包含为所有目标ABI编译的代码.此类APK的大小要大于拆分后的对应文件,导致用户下载不适用于其设备架构的本机二进制文件.

flutter build apk results in a fat APK that contains your code compiled for all the target ABIs. Such APKs are larger in size than their split counterparts, causing the user to download native binaries that are not applicable to their device’s architecture.


--split-per-abi产生两个APK文件:


--split-per-abi results in two APK files:

(flutter build命令默认为--release.)

(The flutter build command defaults to --release.)

<app dir>/build/app/outputs/apk/release/app-armeabi-v7a-release.apk
<app dir>/build/app/outputs/apk/release/app-arm64-v8a-release.apk

其中armeabi-v7a是32位设备,而arm64-v8a是64位设备.

Where armeabi-v7a for is 32-bit devices and arm64-v8a for 64-bit devices.

了解更多信息
https://flutter.dev/docs/deployment/android#build-an- apk
https://flutter.dev/docs/deployment/android#build-应用捆绑包
https://developer.android.com/studio/build/configure-apk-splits#configure-split

Read More on
https://flutter.dev/docs/deployment/android#build-an-apk
https://flutter.dev/docs/deployment/android#build-an-app-bundle
https://developer.android.com/studio/build/configure-apk-splits#configure-split

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

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