异常信息: 配置的属性文件不存在
Error:A problem was found with the configuration of task ':app:packageRelease'.File '
> F:\AndroidStudioProjects\sun\SunshineCarLife\app\build\intermediates\res\resources-release-stripped.ap_'
> specified for property 'resourceFile' does not exist.
解决方案:
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-
android.txt’), ‘proguard-rules.pro’
zipAlignEnabled true
shrinkResources false //改为false 就解决了
signingConfig signingConfigs.release
}
}
出现此类问题的原因是 :
AS 2.2后minifyEnabled=true时包含了shrinkResources=true,即混淆时会自动去掉多余资源,所以我们不需要设置shrinkResources了。
转自:https://blog.csdn.net/q9104422999/article/details/53035260