To make the APK file as small as possible, we should enable shrinking to remove unused code and resources in your release build.
We can disable them in debug builds as it increases build time.
It depends on following :
SDK Tools 25.0.10 or higher
Android plugin for Gradle 2.0.0 or higher
Advantages of using code and resource shrinker :
Keeps the apk size small
Keeps the 64k method count limit in check
Resource shrinking shrinks unused resources both in our code and in the libraries used.
Summary:
To make the APK file as small as possible, we should enable shrinking to remove unused code and resources in your release build. We can disable them in debug builds as it increases build time.
It depends on following :
Advantages of using code and resource shrinker :