修改build.gradle文件,添加
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
例:
android {
compileSdkVersion 19
buildToolsVersion "24.0.2"
aaptOptions.cruncherEnabled = false//添加的代码
aaptOptions.useNewCruncher = false//添加的代码
defaultConfig {
applicationId "com.dian.diabetes"
minSdkVersion 9
targetSdkVersion 19
}
buildTypes {
release {
minifyEnabled true
proguardFiles 'proguard-project.txt'
}
}
}
本文介绍如何通过修改build.gradle文件中的aaptOptions来禁用图片压缩功能,避免资源文件在打包过程中被压缩而导致的问题。
706

被折叠的 条评论
为什么被折叠?



