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的 ...
随机推荐
- OSI7层封包解包动态图-数据在网络中的传输过程.gif
- 关于WCF
凡是被DataMember声明修饰的属性,必须要有get和set访问器,靠靠靠!!!! 给接口加 XmlSerializerFormat 强制用xml序列化.
- android 获取当前 activity
ActivityManager am = (ActivityManager) this .getSystemService(ACTIVITY_SERVICE); List<RunningTask ...
- 【Spring-AOP-学习笔记-6】@AfterThrowing增强处理简单示例
项目结构 业务代码 @Component("hello") public class HelloImpl implements Hello { // 定义一个简单方法,模拟 ...
- bzoj4161: Shlw loves matrixI
Description 给定数列 {hn}前k项,其后每一项满足 hn = a1*h(n-1) + a2*h(n-2) + ... + ak*h(n-k) 其中 a1,a2...ak 为给定数列.请计 ...
- bzoj2765 铁人双项比赛
Description 铁人双项比赛是吉林教育学院的一项传统体育项目.该项目比赛由长跑和骑自行车组成,参赛选手必须先完成k公里的长跑,然后完成r公里的骑车,才能到达终点.每个参赛选手所擅长的项目不同, ...
- linux下安装jdk7
查看linux系统是32位还是64位系统:uname --mi686 //表示是32位x86_64 // 表示是64位新建一个jdk的安装目录,我这里是在/usr/local/下新建了java目录,命 ...
- 小甲鱼-005python数据类型
整型:python3整形理论上没有长度限制,很容易进行大数的运算. 浮点型:没有小数点就是整形,有小数点就是浮点型 e记法:科学技术法1.5e3,即1500,1.3e-4即0.0001.3,e记法是浮 ...
- C++并发编成 03 线程同步
这一节主要讲讲线程同步的方式,C++ 11中提供了丰富的线程同步元语,如condition_variable,futrue,std::packaged_task<>,std::promis ...
- MySQL数据库InnoDB存储引擎
MySQL数据库InnoDB存储引擎Log漫游 http://blog.163.com/zihuan_xuan/blog/static/1287942432012366293667/