解决:debug-stripped.ap_' specified for property 'resourceFile' does not exist.
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、参考
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.的更多相关文章
- 我的Android进阶之旅------>解决:debug-stripped.ap_' specified for property 'resourceFile' does not exist.
1.错误描述 更新Android Studio到2.0版本后,出现了编译失败的问题,我clean project然后重新编译还是出现抑郁的问题,问题具体描述如下所示: Error:A problem ...
- 解决 release-stripped.ap_' specified for property 'resourceFile' does not exist.
设置buildTypes里的release的shrinkResources为false即可,如果是 release-stripped.ap_' specified for property 'reso ...
- debug-stripped.ap_' specified for property 'resourceFile' does not exist.(转载)
1.错误描述 更新Android Studio到2.0版本后,出现了编译失败的问题,我clean project然后重新编译还是出现抑郁的问题,问题具体描述如下所示: Error:A problem ...
- debug-stripped.ap_' specified for property 'resourceFile' does not exist
1.关闭 Instant Run 2. 关闭混淆(混淆的问题) buildTypes { release { minifyEnabled true shrinkResources true progu ...
- packageOfficialDebug和resourceFile does not exist.
Android Studio运行时候报packageOfficialDebug错误 报错信息为 Error:A problem was found with the configuration of ...
- 我的Android进阶之旅------>解决Error: specified for property 'mergedManifest' does not exist.
错误描述 刚运行从Github上面下载而来的代码时,爆了如下所示的bug,错误描述如下所示: Error:A problem was found with the configuration of t ...
- 解决TS报错Property 'style' does not exist on type 'Element'
在使用queryselector获取一个dom元素,编译时却报错说property 'style' does not exist on type 'element'. 原因:这是typescript的 ...
- Property ClientHeight does not exist 问题解决
delphi的TFrame继承自另一个TFrame时,最好通过File->New->Other...->Delphi Projects->Inheritable Items 的 ...
- react中使用typescript时,error: Property 'setState' does not exist on type 'Home'
问题描述: 我在react中用typescript时,定义一个Home组件,然后在组件里用setState时会有这样一个报错:(如图)Property 'setState' does not exis ...
随机推荐
- js监控键盘大小写事件
JavaScript键盘事件侦听 在使用JavaScript做WEB键盘事件侦听捕获时,主要采用onkeypress.onkeydown.onkeyup三个事件进行出来.该三个事 件的执行顺序如 ...
- hdu3949
XOR Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...
- jQuery显示与隐藏返回顶层的箭头
<script type="text/javascript"> $(window).scroll(function(){ var d ...
- ionic list item-radio checked
<div class="list"> <label class="item item-radio" ng-repeat="k in ...
- angular2 学习笔记 ( Form 表单 )
refer : https://angular.cn/docs/ts/latest/guide/forms.html https://angular.cn/docs/ts/latest/cookboo ...
- armv8(aarch64)linux内核中flush_dcache_all函数详细分析
/* * __flush_dcache_all() * Flush the wholeD-cache. * Corrupted registers: x0-x7, x9-x11 */ ENTRY( ...
- HDOJ 1163 Eddy's digital Roots 九余数定理+简单数论
我在网上看了一些大牛的题解,有些知识点不是太清楚, 因此再次整理了一下. 转载链接: http://blog.csdn.net/iamskying/article/details/4738838 ht ...
- LeetCode——Permutations
Permutations Given a collection of numbers, return all possible permutations. For example,[1,2,3] ha ...
- openstack 使用集锦
- Selenium各种工具比较
Selenium 1.0 Selenium 1.0是第一个基于浏览器的开源自动化测试工具.它可以使用所有支持http库的编程语言,也可以运行在所有支持javascript的浏览器上.当然它 也有它的缺 ...