以前的老项目,导入到AndroidStudio 2.2.2时,报错:
解决办法 :
Error:A problem was found with the configuration of task ':app:packageDebug'.
> File 'E:\AndroidStudio\work\AUWoQu\YingYongShiChang\app\build\intermediates\res\resources-debug-stripped.ap_' specified for property 'resourceFile' does not exist.解决办法 :
打开app的build.gradle
将shrinkResources 设置为false
buildTypes {
release {
minifyEnabled true
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
//开启代码混淆
minifyEnabled false
// 移除无用的resource文件
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
本文介绍了解决在Android Studio 2.2.2中遇到的资源文件不存在导致的错误的方法。通过调整项目的build.gradle文件中的shrinkResources配置项为false来解决此问题。
5074

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



