~ 1 min read

Lean and Fast - How to shrink down and lean down Android apps

Zopfli

Despite previous advice - do not use zopfli for alternative compression

Images

If the images were manually optimized - turn off the cruncher. You can do zopli compression on the images unlike on the apps Use WebP (but support is only available since Android 4.0)

// Gradle Plugin 2.0+
android{
    defaultconfig {
        vectorDrawables.useSupportLibrary = true
    }
}

Use Proguard

Use proguard. It is tough and things break but it is worth it.

This configuration though will not use full blown ProGuard but use a built in simplified shrinker.

minifyEnabled true
useProguard false   

use @Keep annotation in code to generate ProGuard rules automatically during the build process

Open sourced tool ClassyShark