如何优化Flutter App的大小? [英] How to optimize the Flutter App size?

查看:477
本文介绍了如何优化Flutter App的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名本地Android开发人员,我开始使用flutter SDK.我遵循官方flutter文档开发了一个简单的应用程序.但是我发现调试应用程序的大小为46 MB,对于这个简单的应用程序来说太大了.有什么方法可以优化应用大小?因为Flutter应用程序的尺寸大于本机Android应用程序.

I am a native Android developer and I started using flutter SDK. I developed a simple app by following official flutter doc. But I found that the debug app size is 46 MB which is too large for this simple app. Is there any way to optimize the app size? because Flutter app size is larger than the native Android App.

推荐答案

Flutter调试应用非常大,要优化该应用,您应使用

Flutter debug app is very big, to optimize the app you should build it as release version by using

flutter build apk (flutter build defaults to --release).

准备要发布的Android应用

准备要发布的iOS应用

这篇关于如何优化Flutter App的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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