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

Massive app size increase after install this plugin #25

Closed
SaliBhdr opened this issue Oct 20, 2020 · 5 comments
Closed

Massive app size increase after install this plugin #25

SaliBhdr opened this issue Oct 20, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@SaliBhdr
Copy link

Describe the bug
Before installing the plugin, my app was 26.3 Mb and After I install the ^0.2.8 version of this plugin the app size increased up to 44.6Mb on android

To Reproduce
Steps to reproduce the behavior:
Install the plugin and run flutter build apk --release

Expected behavior
There is at least an 18Mb gap between two builds. Is the plugin has this much size?

Desktop (please complete the following information):

  • OS: Widows
  • Version: 10

Smartphone (please complete the following information):

  • Device: Nexus 5x Emulator
  • OS: Android
  • Version 9.0
@SaliBhdr SaliBhdr added the bug Something isn't working label Oct 20, 2020
@binSaed
Copy link
Owner

binSaed commented Oct 20, 2020

you can check my last app I use the package with it
https://play.google.com/store/apps/details?id=com.Suhaib_Digital_Base&hl=en_US
total app size this between 8.5MB to 11MB
PLEASE DON'T USE APK => use appbundle

@SaliBhdr
Copy link
Author

@AbdOoSaed But what if I don't want to use the app bundle?
In fat app build mode, When I build apk without the pdf reader plugin, It was about half the size when the plugin was installed. do you have any idea what could cause this? some wrong config in .gradle or something like that.

@binSaed
Copy link
Owner

binSaed commented Oct 21, 2020

@SaliBhdr
we use AndroidPdfViewer for view pdf in android
as he says in package doc
Android PdfViewer depends on PdfiumAndroid, which is set of native libraries (almost 16 MB) for many architectures.

for this In the fat app, the size will increase by 16 MB

u can read the whole doc in this link

the solution => split ur apk to many architectures or use appbundle as I said

@SaliBhdr
Copy link
Author

@AbdOoSaed Ooow. I see!! I happened to be very surprised why this happened. Thanks for the explanation.

@binSaed
Copy link
Owner

binSaed commented Oct 21, 2020

@SaliBhdr
have a nice day
now I will close the issue
If you have any questions please reopen it

@binSaed binSaed closed this as completed Oct 21, 2020
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