首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >APK文件的大小为20MB是否正常?

APK文件的大小为20MB是否正常?
EN

Stack Overflow用户
提问于 2020-06-06 01:12:34
回答 2查看 221关注 0票数 1

我已经为我的项目制作了.apk文件,它的大小是19.4MB,正常吗?我使用了以下命令:

flutter build apk --release该命令确实会生成apk文件,但会输出以下消息:

代码语言:javascript
复制
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
    To generate an app bundle, run:
        flutter build appbundle --target-platform android-arm,android-arm64,android-x64
        Learn more on: https://developer.android.com/guide/app-bundle
    To split the APKs per ABI, run:
        flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
        Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2020-06-06 01:20:45

20MB是一个正常的大小,但你的应用程序的大部分大小是由android-arm、android-arm64和android-x64的二进制文件贡献的。在特定设备中,根据设备硬件,即设备的abi,仅使用其中一个二进制文件。

建议使用app bundle,因为Google会自动为每个abi创建APK,从而减少app的大小。

例如,Play Store将为android-arm、android-arm64和android-x64ABI创建单独apk。

票数 2
EN

Stack Overflow用户

发布于 2020-06-06 01:26:21

是的,这对于apk文件来说是正常的。您已经为多进程支持构建了二进制文件,如x64、arm等,这就是为什么在您的情况下大小更大的原因。但它不会产生任何问题。你可以通过只为你想要运行你的应用程序的目标平台构建二进制文件来减少你的apk的大小。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62220745

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档