异常信息: 配置的属性文件不存在
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
}
}
特别鸣谢 网友 x158454996 的解答 出现此类问题的根源问题
出现此类问题的原因是 :
AS 2.2后minifyEnabled=true时包含了shrinkResources=true,即混淆时会自动去掉多余资源,所以我们不需要设置shrinkResources了。
安卓开发交流群 : 595856941