I recently added the following packages to my Flutter project:
dependencies:
sqflite: ^2.3.2
path: ^1.8.3
Since adding these packages, I’ve noticed that my APK size has increased by approximately 100 MB, bringing the total size to around 200 MB. This is a significant increase, and I’m concerned about the impact on app performance and user experience.
What I Have Tried:
-
Run
flutter clean
: Cleared build artifacts and cached files. -
Clear Flutter and Gradle Cache: Used
flutter pub cache repair
and deleted.gradle
caches. -
Analyze APK Size: Attempted to analyze the APK size but faced issues with specifying a single ABI.
Questions:
-
Is it common for the
sqflite
andpath
packages to cause such a large increase in APK size? -
What are the possible reasons for this substantial size increase after adding these packages?
-
What additional steps can I take to further investigate and reduce the APK size?
Any guidance or suggestions on how to resolve this issue would be greatly appreciated.
Thank you!
I am not sure about sqflite and path. But here are some tips to cretae apk a bit lighter.
- flutter clean
- flutter pub get
- flutter build apk –release
this will create apk in release.
I hope this work for you.