At first I know Remove all unused resources from an android project, but that is only for projects.
我想从 Google Play 服务或 Wearable SDK 等库中删除未使用的图像。我已经知道我可以使用 resConfigs
删除 gradle 中不需要的语言,但我不知道如何删除不使用的图像和布局。有什么办法可以避免它们被添加?
最佳答案
我几乎错过了写现在有一个很好的解决方案:
android {
buildTypes {
release {
minifyEnabled true
shrinkResources true
}
}
}
这是在 Google+ by Tor Norbye 上宣布的对于构建工具版本 0.14.0
关于android - 如何从库中删除未使用的资源?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25843122/