-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Use case
APK Size
Proposal
Subject:On different machines, the same App is packaged to generate Android xxx.apk or iOS xxx.ipa packages of different sizes.
Dear Google Flutter Team,
I hope this message finds you well. I am writing to ask whether this question is a normal phenomenon.
As you know, there are many factors that affect package size when packaging Flutter programs. For example: Flutter core engine, framework, application code, license file size, necessary Java code, Flutter and Dart versions, packaged platform, etc.
According to the above conceivable conditions, we have conducted a large number of tests to ensure that the versions of Flutter and Dart are the same, and the source code of the packaged App needs to be consistent (the signatures are all used by default, without special treatment).
When packaged on different Windows computers (with the same operating system), the test results show that the size of the .apk or .ipa packaged each time is completely different.
Packaging on different Windows computers (the operating system is the same), even if the size of the apk is the same, but the value of sha1 is different.
Here are some of the intercepted packaging records:
OS | Flutter | Dart | Packaged Size | Other |
---|---|---|---|---|
windows | 3.7.5 | 2.19.2 | 25,647,494 | sha1: b05453d8e3212fc92cf9641c95beae7a5d7c9535 |
windows | 3.7.5 | 2.19.2 | 25,647,494 | sha1: 39520075ac2f16bbc0a953b5f0b5561925907e7f |
windows | 3.7.5 | 2.19.2 | 25,649,671 | - |
windows | 3.7.5 | 2.19.2 | 25,647,522 | - |
The above tests are all packaged to generate the apk package of Android.
From the above results, we can see that all the factors that can be controlled on my side are under control, and we can see that the size of the package generated is different.
Note that SHA1 values are also different, whether it can be assumed that even if the files packaged by the same computer are of the same size, the actual package contents will be different.
So I would like to ask the Flutter team, is this a normal phenomenon? Or because of what problems we have in packaging, the actual size of the generated package is different.
If it is a normal phenomenon, I hope the Flutter team can give some positive responses, and if it is because of any problems in our packaging, I hope the Flutter development team can provide a solution and direction, and whether other developers also have related questions.
I would be happy to discuss this issue further and provide any necessary assistance to explore whether there is a problem. The development of Ffltter is amazing, and I believe this solution can contribute to its continued success.
Thank you for taking the time to consider my question. I look forward to hearing your ideas and working together to make Flutter more efficient and easy to use for developers around the world.