3

My Flutter application bundle contains native libraries, libapp.so and libflutter.so, each around 8-9MB. How can I find what is contributing to size of those files or which dependencies they're coming from?

Tomek ZJadzia
  • 31
  • 1
  • 2
  • The above mentioned files contains the compiled form of flutter framework and other native script in your project/ dependency. – Darish Feb 14 '20 at 04:26
  • Do you know how I can find which dependencies are contributing most to the size of those? – Tomek ZJadzia Feb 14 '20 at 14:34
  • UPDATE: Looks like for a starter app itself (straight from 'flutter create') libflutter.so is 8.1MB and libapp.so is 4.1MB – Tomek ZJadzia Feb 14 '20 at 16:17
  • flutter is a portable UI tool kit, so everything related to flutter has to be included with in the App. So every flutter app will have those .so files. – Darish Feb 15 '20 at 05:00
  • I can't find `libapp.so`, where could it be . Edit: Ohh, the debug APK doesn't have it, but the release APK does. – Ben Butterworth Dec 03 '22 at 23:21

2 Answers2

4

libflutter.so (the flutter engine)

libapp.so (your code).

zerocool
  • 3,256
  • 2
  • 24
  • 40
3

Flutter is a portable UI tool kit, means everything that flutter depends upon must be included with in the APK file. So every flutter will have those mentioned .so files.

The mentioned .so files includes Dart language dependency, skia engine, flutter framework, platform related native code etc.

Darish
  • 11,032
  • 5
  • 50
  • 70