您的位置:首页 > 移动开发

Error:A problem was found with the configuration of task ':app:packageDebug' 问题解决

2017-10-26 15:24 621 查看
以前的老项目,导入到AndroidStudio 2.2.2时,报错:

[html] view
plain copy

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

[html] view
plain copy

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'  

        }  

    }  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐