scientifichackers / flutter_pdf_viewer

A native PDF viewer for flutter.
MIT License
107 stars 40 forks source link

Application is size is getting increase by 19 Mb #8

Closed chhota89 closed 6 years ago

chhota89 commented 6 years ago

After adding the library the application size is getting increased by 19 Mb. Without library, the apk size is 5.3 Mb and after flutter_pdf_viewer library is added apk size reached to 24 Mb.

Pubspec.yml file `name: flutter_movie_app description: A new Flutter application.

dependencies: flutter: sdk: flutter

cupertino_icons: ^0.1.2 url_launcher: ^3.0.0 scoped_model: ^0.3.0 rxdart: ^0.18.1 flutter_pdf_viewer: ^0.0.4 http: ^0.12.0

flutter: uses-material-design: true fonts:

devxpy commented 6 years ago

You're going to have to take that upstream, sorry.

https://github.com/barteksc/AndroidPdfViewer#why-resulting-apk-is-so-big

chhota89 commented 6 years ago

any idea what will be the apk size after generating split apk

devxpy commented 6 years ago

@chhota89. No idea, I never had an issue with the APK size.

You might be interested in open_file plugin which opens the pdf in external app, and hence the apk size is minimal.

devxpy commented 5 years ago

@chhota89 I tested it out, and the resulting APK size decreased significantly, around 5x less, from ~50MB to ~10MB.

devxpy commented 5 years ago

Keep in mind that you will need to set the --target switch for each flutter build apk command, since flutter will only add libflutter.so for 32-bit ARM (armeabi-v7a) by default. Will add a section in the README, about this.