Suddenly the apk size increase from 24 mb to 88 mb

143

Solution 1

Have you added any new dependencies since your last release build?

Solution 2

I assume you built a universal APK. This type of APK contains all the files that are required for all types of CPU. This also makes the APK very large.

Try running flutter build apk --split-per-abi. This will create a seperate APK for the different CPU types.

Share:
143
Mariam Younes
Author by

Mariam Younes

Updated on December 31, 2022

Comments

  • Mariam Younes
    Mariam Younes over 1 year

    I had used flutter build apk more than 20 times and it size was 24 mega byte but now suddenly it is 88 mega byte in release mode can anyone tell me why that happen

    note : the assets file is 4.9 mega byte note : i don't have any videos or gif in my app

    • OMi Shah
      OMi Shah almost 3 years
      Building bundle app? Try flutter clean before building the app bundle / apk
    • Mariam Younes
      Mariam Younes almost 3 years
      i want to build release apk , and yes i did flutter clean
  • Mariam Younes
    Mariam Younes almost 3 years
    but at the morning i build the release apk with 24 mb and it was no problem
  • Benedikt J Schlegel
    Benedikt J Schlegel almost 3 years
    @MariamYounes Have you tried "split-per-abi"? I can't imagine anything else causing such a huge size difference.
  • Mariam Younes
    Mariam Younes almost 3 years
    I tried it and the size become 38 and it is very big also
  • Mariam Younes
    Mariam Younes almost 3 years
    Yes , file picker - url_launcher - voice
  • Mariam Younes
    Mariam Younes almost 3 years
    flutter_sound this package is the reason for fat apk , after deleting it , the size return to 26 but i need this package
  • Ward Suleiman
    Ward Suleiman almost 3 years
    Cool ! Can you mark my answer as approved ?