-
Notifications
You must be signed in to change notification settings - Fork 27.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android][iOS] Builds generated on different machines have different sizes #137990
Comments
Hi @StarRookies It would be appreciated if you could check this with a Android native project as well. Thanks! |
Hi @huycozy Thank you for taking the time to answer my questions back and forth. We did use some other good plugins/packages in our Flutter project. But because the version is all the same and the code has not changed, I don't think this problem will arise because of the difference in the code. Here I mainly want to know what factors affect the packet size and what factors in different Windows computers may cause the above problem. Do you need some of Windows's own content during the packaging process, because different contents lead to different sizes of the generated APK packages? Thank you again for your reply. |
Could you confirm package versions in use from Also, could you please share how you verify the apk/ipa file? (Did you use Android Studio for this?) |
Thank you for taking the time to answer my questions back and forth.
The package used in Pubspec.lock is the specified version.
Yes, I use Android Studio IDE for packaging. |
Yes, it will be a specific version. Please make sure all fetched versions (in pubspec.lock) are the same between machines. Also, please share the output of |
We have ensured that the version of the content is consistent (in pubspec.lock).
|
Thanks for the update. Perhaps someone from tool team can help to explain this phenomenon. |
Thank you very much for your reply. I hope you can give me a more useful reply, our team is confused about this question now. |
Hi @huycozy I'm so sorry to bother you again. With regard to this question, it may be very difficult to investigate why it caused this phenomenon. However, I would like to know whether this phenomenon is normal. Will not have an impact on the project. We look forward to your reply. Thank you very much. |
Hi @StarRookies, I will escalate this issue to the team. Thanks for your patience. |
Hi @huycozy , Thank you very much for your reply. I look forward to hearing from your team very much. |
Hi @huycozy, If this question is difficult to answer, in other words, does the developer need to care about it? |
Is there an existing issue for this?
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:
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.
The text was updated successfully, but these errors were encountered: