[英]Android Gradle remove resources from apk
I have set a dependency project using gradle, but this project has a lot of resources which are unused in classes which I am using. 我已经使用gradle设置了一个依赖项目,但是这个项目有很多资源在我正在使用的类中没有使用。 Is it possible to somehow filter them?
有可能以某种方式过滤它们吗?
I have been trying to do it using 我一直在尝试使用它
applicationVariants.all { variant ->
variant.mergeResources.inputResourceSets.each {
ResourceSet res ->
res.sourceFiles.each {
File s ->
//here I identify some source files and then I removed them from sourceFiles
}
}
}
but that didn't work 但那没用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.