But why would that be? No gradle properties have changed, just the min sdk.
According to this answer on reddit and this issue on Google issue tracker that's because starting with API 23 the platform can read native libraries without extracting them if they are uncompressed, so they changed the default value of extractNativeLibs
manifest attribute.
If you declare minSdk 23 or higher, building the APK with uncompressed native libraries should save space on devices because:
- APK is compressed before download anyway, so download size doesn't change
- after installation, there's only one copy of the library (uncompressed inside APK)
When I just tested this, the size after installation was actually higher with minSdk 23 compared to 22, contrary to what they say should happen. That is because the APK includes libraries for all ABIs. If I use only one ABI it is a bit smaller with minSdk 23.
Any thoughts on how to decrease the APK size again?
So until you start splitting the APK or use App Bundle (which is pretty easy and can decrease the size even more), you may want to set android:extractNativeLibs="true"
in your AndroidManifest.xml
to get the old behavior.