最佳答案
minify features of proguard。
android {
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
...
}
另外,请记住,如果您采用了proguard路线,则需要重新评估依赖关系,并对使用反射的任何代码进行特殊异常(exception)处理。
关于android - Android如何从APK文件中排除某些文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46963975/