As i need to reduce the size of APK file, I have followed Apk Expansion guide to divide APK in chunks.
The Downloader library defines ways to download the expansion file
, but i need to know the way to exclude resource files
and aar
files from the apk.
I found following, but these are neither removing any resource-drawable files
nor any arr
files, and the size of apk remains same.
For testing purpose, i have added drawables
of around 4 MB
and couple of arr
files of size 3 MB
. I am creating apk
from Build->Build APK
option. I don't know if following will effect only on signed APK.
sourceSets {
main {
resources {
exclude '**/drawable/*'
}
}
}
android {
packagingOptions {
exclude 'lib/armeabi/a.so'
}
}