How to remove unused resources from libraries?

假如想象 提交于 2019-12-03 08:40:53

I almost missed it to write that there is now a nice solution:

android {
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
        }
    }
}

This was annouced on Google+ by Tor Norbye for the build tools version 0.14.0

Probbably all you need to know about that is in this very good article from Cyril Mottier : http://cyrilmottier.com/2014/08/26/putting-your-apks-on-diet/

Read the part about Lint ("Use Lint extensively"), as it's the tool that allow you to remove unused resources.

Hope it helps...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!