flutter_full_pdf_viewer
flutter_full_pdf_viewer copied to clipboard
Android APK bundle weight
Good morning,
I noticed a big bundle weight increase after adding this package to my pubspec.yaml
packages file.
Before
enricobenedos@MBP-di-Enrico my_app % flutter build apk
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Note: /Users/enricobenedos/SDKs/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 70.8s
✓ Built build/app/outputs/apk/release/app-release.apk (23.3MB).
Now
enricobenedos@MBP-di-Enrico my_app % flutter build apk
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 67.7s
✓ Built build/app/outputs/apk/release/app-release.apk (40.3MB).
From 23.3MB to 40.3 MB. Is it normal? I've never seen a Flutter heavy package like this. Does this package use native iOS and Android API?
Thank you
I have the same problem,forwarding............
Most of the packages relating to pdf in flutter add from 15-17mb to the build size. The solution I found was to use the native pdf view package. It processes pdf natively without adding to build size.
@razein97 How to use, can there be examples?
@liyang1518 https://pub.dev/packages/native_pdf_view Check the pub page. It's explained pretty clearly.
@liyang1518 https://pub.dev/packages/native_pdf_view Check the pub page. It's explained pretty clearly.
ok,thinks