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. 解决方法
Android Studio 之 打包生成的 apk 安装包装到手机上闪退
报错:
报ClassNotFoundException: Didn't find class "...Activity" on path: DexPathList
有参考过这篇博客:http://www.cnblogs.com/xinaixia/p/6888334.html
解决方法同(下面的解决方法一:)
解决方法一
第一步: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,shrinkResources true改为shrinkResources 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 JavaCode 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'
}
}
作者:欧阳鹏 欢迎转载,与人分享是进步的源泉!
转载请保留原文地址:http://blog.csdn.net/ouyang_peng
debug-stripped.ap_' specified for property 'resourceFile' does not exist.(转载)的更多相关文章
- 解决 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 ...
- 我的Android进阶之旅------>解决: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 ...
- Property ClientHeight does not exist 问题解决
delphi的TFrame继承自另一个TFrame时,最好通过File->New->Other...->Delphi Projects->Inheritable Items 的 ...
- ADOQuery.Parameters: Property Parameters does not exist
Exception class EReadError with message 'Property Parameters does not exist'. Exception class EReadE ...
- 解决TS报错Property 'style' does not exist on type 'Element'
在使用queryselector获取一个dom元素,编译时却报错说property 'style' does not exist on type 'element'. 原因:这是typescript的 ...
随机推荐
- ORM练习项目-图书管理系统(BMS)实现细节
分析 一本书 可以由多个作者编著 一本书只能由一个出版社出版 一个作者可以写多本书 每个作者有自己的简介 对应关系: Author-Book # 多对多 Publish-Book # 一对多 Auth ...
- mysql实战优化之九:MySQL查询缓存总结
mysql Query Cache 默认为打开.从某种程度可以提高查询的效果,但是未必是最优的解决方案,如果有的大量的修改和查询时,由于修改造成的cache失效,会给服务器造成很大的开销. mysql ...
- RAID磁盘阵列的原理与搭建
学习导图 RAID-0结构关系图 RAID-1结构关系图 RAID-5:条带+分布校验(三块磁盘以上) RAID-10:镜像+条带(四块磁盘以上) RAID-0 添加两块硬盘,分别为磁盘1.磁盘2.最 ...
- Hessian与Webservice的区别
Hessian:hessian是一个轻量级的remoting onhttp工具,使用简单的方法提供了RMI的功能,相比WebService,Hessian更简单.快捷. 采用的是二进制RPC协议,因为 ...
- Java 集合 线程安全
Java中常用的集合框架中的实现类HashSet.TreeSet.ArrayList.ArrayDeque.LinkedList.HashMap.TreeMap都是线程不安全的,如果多个线程同时访问它 ...
- PHP流程控制 - if 语句
PHP - if 语句 if 语句用于仅当指定条件成立时执行代码. 语法 if (条件) { 条件成立时要执行的代码; } 如果当前时间小于 20,下面的实例将输出 "Have a good ...
- ECCV 2018 | 给Cycle-GAN加上时间约束,CMU等提出新型视频转换方法Recycle-GAN
CMU 和 Facebook 的研究者联合进行的一项研究提出了一种新型无监督视频重定向方法 Recycle-GAN,该方法结合了时间信息和空间信息,可实现跨域转换,同时保留目标域的风格.相较于只关注空 ...
- SQL中去掉字符串中最后一个字符(小技巧)
--长度减一就可以了 select left(字段名,len(字段名)-1) from 表名
- python之路07文件处理
一 操作文件的方法: f.read() #读取所有内容,光标移动到文件末尾 f.readline() #读取一行内容,光标移动到第二行首部 f.readlines() #读取每一行内容,存放于列 ...
- 并发基础(七) Thread 类的sleep()、yeild()、join()
1.Thread.sleep(long millis ) sleep( )是一个静态方法,让当前正在执行的线程休眠(暂停执行),而且在睡眠的过程是不释放资源的,保持着锁. 在睡眠的过程,可以被中断,注 ...