1.错误描述

更新Android Studio到2.0版本后,出现了编译失败的问题,我clean project然后重新编译还是出现抑郁的问题,问题具体描述如下所示:


Error:A problem was found with the configuration of task ':watch:packageOfficialDebug'.
> File 'D:\Code\XTC_VersionCompatible\watch\build\intermediates\res\resources-official-debug-stripped.ap_' specified for property 'resourceFile' does not exist.

如下图所示: 

2. 解决方法

解决方法一

第一步:File—>Settings,打开Settings界面,搜索到Instant Run,如下图所示 

第二步:去掉第一项的勾选,即去掉“Enable Instant Run to hot swap code/resources on deploy (default enabled)”,如下图所示: 

第三步:再重新编译,即可成功。 

解决方法二

关闭Debug模式下的混淆开关,如下所示:

我本地的大致如下,开启了混淆

 buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

第一步:关闭debug模式下的混淆开关,即将minifyEnabled true改为minifyEnabled false,如下所示:

 buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

第二步:重新编译即可。

3、参考

上述解决方法参考于:http://stackoverflow.com/questions/36540676/build-intermediates-res-resources-anzhi-debug-stripped-ap-specified-for-prope

Instant Run feature not compatible with proguard on debug mod.

http://tools.android.com/tech-docs/instant-run

Note: Instant Run temporarily disables the Java Code Coverage Library (JaCoCo) and ProGuard. Because Instant Run only works with debug builds, this should not affect your release build.

You can disable Instant Run or disable proguard on debug mod.

(Disabling ProGuard on debug.gradle)

 buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

解决:debug-stripped.ap_' specified for property 'resourceFile' does not exist.的更多相关文章

  1. 我的Android进阶之旅------>解决:debug-stripped.ap_' specified for property 'resourceFile' does not exist.

    1.错误描述 更新Android Studio到2.0版本后,出现了编译失败的问题,我clean project然后重新编译还是出现抑郁的问题,问题具体描述如下所示: Error:A problem ...

  2. 解决 release-stripped.ap_' specified for property 'resourceFile' does not exist.

    设置buildTypes里的release的shrinkResources为false即可,如果是 release-stripped.ap_' specified for property 'reso ...

  3. debug-stripped.ap_' specified for property 'resourceFile' does not exist.(转载)

    1.错误描述 更新Android Studio到2.0版本后,出现了编译失败的问题,我clean project然后重新编译还是出现抑郁的问题,问题具体描述如下所示: Error:A problem ...

  4. debug-stripped.ap_' specified for property 'resourceFile' does not exist

    1.关闭 Instant Run 2. 关闭混淆(混淆的问题) buildTypes { release { minifyEnabled true shrinkResources true progu ...

  5. packageOfficialDebug和resourceFile does not exist.

    Android Studio运行时候报packageOfficialDebug错误 报错信息为 Error:A problem was found with the configuration of ...

  6. 我的Android进阶之旅------>解决Error: specified for property 'mergedManifest' does not exist.

    错误描述 刚运行从Github上面下载而来的代码时,爆了如下所示的bug,错误描述如下所示: Error:A problem was found with the configuration of t ...

  7. 解决TS报错Property 'style' does not exist on type 'Element'

    在使用queryselector获取一个dom元素,编译时却报错说property 'style' does not exist on type 'element'. 原因:这是typescript的 ...

  8. Property ClientHeight does not exist 问题解决

    delphi的TFrame继承自另一个TFrame时,最好通过File->New->Other...->Delphi Projects->Inheritable Items 的 ...

  9. react中使用typescript时,error: Property 'setState' does not exist on type 'Home'

    问题描述: 我在react中用typescript时,定义一个Home组件,然后在组件里用setState时会有这样一个报错:(如图)Property 'setState' does not exis ...

随机推荐

  1. php回调函数callback函数实例

    <?php // 将文本中的年份增加一年. $text = "April fools day is 04/01/2002\n"; $text.= "Last chr ...

  2. IE下的firebug调试利器

    1. 文件调用 把下面js代码,包含在要调试的页面中. <script src="https://getfirebug.com/firebug-lite.js">< ...

  3. debian小巧好看的桌面

    先看完,不然,你一定会后悔的..不好看,你打我.. sudo apt-get install xfce4 sudo apt-get install xfce4-goodies sudo apt-get ...

  4. elasticsearch常用的插件

    deb 安装/usr/share/elasticsearch/   https://github.com/hangxin1940/elasticsearch-cn-out-of-box 包可以参考   ...

  5. My97DatePicker 与 某个CSS冲突 ,导致无法显示

    调试 Metronic3.7 模版  ,boostrap的时间插件不怎么好用,改用My97DatePicker, 发现某个与plugins.css中某个插件冲突,经排查发现 css 中有这一段 ifr ...

  6. UI基础 - UILabel

    //根据文字获取size - (CGSize)getSizeWithstring:(NSString *)string { CGSize maxSize = CGSizeMake(320, 320); ...

  7. C语言字符数组越界现象

    今天在用C的过程中发现一个奇怪的现象.代码如下: ]; chs[] = 'a'; chs[] = 'b'; printf(]); 结果 输出 是  a. 在网上查了一下.有个网友是这样回答的: “ 我 ...

  8. 转:Node.js邮件发送组件- Nodemailer 1.0发布

    原文来自于http://www.infoq.com/cn/news/2014/07/node.js-nodemailer1.0-publish Nodemailer是一个简单易用的Node.js邮件发 ...

  9. 【Oracle】安装

    http://www.2cto.com/database/201208/150620.html 呵呵,花了一个多小时,左右把11g安装折腾好了.其中折腾SQL Developer 花了好长时间,总算搞 ...

  10. OpenGl学习总结

    http://wenku.baidu.com/view/5305fe4f866fb84ae45c8dcd.html