I'm setting shrinkResources to true as follows:
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
R.raw.Keep (xml file)
<?xml version="1.0" encoding="utf-8"?> <resources xmlns:tools="http://schemas.android.com/tools" tools:shrinkMode="strict" />
Dont forget to Reference this Resource from .java source file. For more details see this
if you are worried about the size of your apk file then its good practice to shrink image files as well. That is convert RGB channel to Indexed channel,this can save up to 50% more space.
Use this site to Shrink your images media4x.com