Skip to content
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

Issue with apk size #20

Closed
amanv8060 opened this issue Oct 3, 2020 · 6 comments
Closed

Issue with apk size #20

amanv8060 opened this issue Oct 3, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@amanv8060
Copy link

Using this package adds up approximately 15 mb to my apk . Is there some optimization

@amanv8060 amanv8060 added the bug Something isn't working label Oct 3, 2020
@binSaed
Copy link
Owner

binSaed commented Oct 9, 2020

15MB is so big
I have more than an app in google play using my package and app size 9MB approx

so I will give u some advice

- size in debug mode is different from release mode

- don't upload apk to google play it is recommended to use appbundle to let google split it to different CPU architecture

- and don't forget to add proguard-rules.pro

https://github.com/AbdOoSaed/flutter_cached_pdfview/blob/8ca667d27234cde23a8ebef0e3220ec90a98dba2/example/android/app/proguard-rules.pro#L1

- and build.gradle from line 49 to 69

https://github.com/AbdOoSaed/flutter_cached_pdfview/blob/8ca667d27234cde23a8ebef0e3220ec90a98dba2/example/android/app/build.gradle#L49

@binSaed binSaed closed this as completed Oct 14, 2020
@amanv8060
Copy link
Author

i have attahced size analysis for both ,this is of a specific apk architecture , not fat apk

size jsons.zip

@binSaed
Copy link
Owner

binSaed commented Oct 14, 2020

@amanv8060

the diff is only 3MB when u use bundle

DIF

@amanv8060
Copy link
Author

amanv8060 commented Oct 14, 2020

No difference is 18 mb , I am surprised too , that why adding this is causing issue
I tried atleast 7-8 times before and after filing the issue

@binSaed
Copy link
Owner

binSaed commented Oct 14, 2020

18MB for all architectures
every device only use one architecture
google play will split ur bundle

@amanv8060
Copy link
Author

Yes , i am aware of that , notice that , these are the analysis for specific cpu structure not of fat apk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants