androidkotlingradleproguard

APK Size Doubled Despite No Changes to lib and assets Folders


I recently received a release for my Android app that was 90 MB. However, the latest release has doubled in size, despite no changes to the lib and assets files. but the raw size of same files are doubled

I've compared the two APKs, and the contents of the lib and assets folders are identical. Additionally, there have been no changes to the proguard_rules.txt file or the build.gradle files.

Does anyone know what could be causing this sudden increase in APK size?

Thank you!

here's two apk analyze's comparison: smaller apk

enter image description here


Solution

  • I rollbacked to my previous version and changing min SDK from 21 to 31 was the cause, changing the min SDK downto 21 decreased app size by half.

    here's why:

    Whether to use the legacy convention of compressing all dex files in the APK. If null, dex files will be uncompressed when minSdk >= 28.
    
    This property does not affect dex file compression in APKs produced from app bundles.