I decided to try apk sliptting to reduce the size of my apk. I added the following to my gradle build file
splits {
// Configures multiple APKs based on screen density.
density {
// Configures multiple APKs based on screen density.
enable true
// Specifies a list of screen densities Gradle should not create multiple APKs for.
exclude "ldpi"
// Specifies a list of compatible screen size settings for the manifest.
compatibleScreens 'small', 'normal'
}
}
This successfully generates separate apks for the various densities. However, I noticed that all of the apks were the same size, none of them were smaller than the universal apk. So, I loaded one (app-hdpi-release.apk) into the apk analyzer and found that it contained all resources. None were stripped out.
So effectively all the config did was to generate the same apk with different filenames. Am I missing something? Are there any other build options that could potentially be blocking the resources being removed?