I have a relatively small and simple application that has always generated a ~17 MB release APK file. Some time ago I noticed that the APK size increased to a whopping (for this app) 39 MB. I tracked down the change that caused it and it turns out that the same codebase, where the only change is the minSdkVersion
from 16 to 26 without any other changes results in the APK increase.
Strange thing is, when I unpack the APKs, the unpacked directories take up ~40 MB on disk. There are some changes, but all of them are in very small files, like some layouts are missing in the 26 version, negligible. The biggest part of the 40 MB is the lib folder which contains *.so libraries, which amounts to 37 MB, but they are identical in both APK versions. (The application is a Flutter application build with flutter build apk --release
.)
I don't actually want nor need the minSdkVersion
to be 26 and will revert this change, but I am very curious about:
- What changed along the way in Android to cause such a dramatic size increase between these two
minSdkVersion
s? - How can the APKs, when unpacked, be of pretty much the same size? Seems like maybe the compression when build for
minSdkVersion
16 was much better? - If the unpacked directories are of pretty much the same size, does the size increase actually matter for the end users? Will they need to download 17 vs 37 MB? Will the app build for
minSdkVersion
26 take up more space on their devices?