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、参考

上述解决方法参考于: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 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.(转载)的更多相关文章

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

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

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

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

  3. 我的Android进阶之旅------>解决: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. Property ClientHeight does not exist 问题解决

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

  8. ADOQuery.Parameters: Property Parameters does not exist

    Exception class EReadError with message 'Property Parameters does not exist'. Exception class EReadE ...

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

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

随机推荐

  1. golang显示本机IP代码

    package main import ( "fmt" "net" ) func main() { addrs, err := net.InterfaceAdd ...

  2. 【EasyUI学习-1】MyEclipse+easyui学习官方Demo

    介绍 easyui的介绍,网上很多,这里就不进行介绍了. easyUI获取 官网: http://www.jeasyui.com/  下载地址:http://www.jeasyui.com/downl ...

  3. unittest框架断言方法

    assertEqual(a, b)          判断a==b assertNotEqual(a, b)     判断a!=b assertTrue(x)                bool( ...

  4. OS信号实现Java异步通知

    OS信号实现Java异步通知本文将结合操作系统的信号机制,来尝试实现一个简单的,不依赖功能环境的Java异步通知功能.没有特殊说明,本文所有的示例,都是基于Linux.信号简介信号是在软件层次上对中断 ...

  5. 术语-服务:PaaS

    ylbtech-术语-服务:PaaS PaaS是Platform-as-a-Service的缩写,意思是平台即服务. 把服务器平台作为一种服务提供的商业模式.通过网络进行程序提供的服务称之为SaaS( ...

  6. 接口测试3-4使用csv进行接口测试

    参照前面的例子 向URL发送corpid和corsecret2个参数,可以获取正确的tokenid https://qyapi.weixin.qq.com/cgi-bin/gettoken 数据 场景 ...

  7. Linux 期中架构 PHP

    环境 PHP安装前准备  先将需要的软件包如下位置放置.另外需要有WWW用户   参照nginx 满足以上条件后执行安装脚本 PHP安装脚本: #!/bin/bash #install PHP #au ...

  8. Nginx的ip_hash指令

    ip_hash 语法:ip_hash 默认值:none 使用环境:upstream 当对后端的多台动态应用服务器做负载均衡时,ip_hash指令能够将某个客户端IP的请求通过哈希算法定位到同一台后端服 ...

  9. sklearn安装

    1.准备工作 安装sklearn之前,我们需要先安装numpy,scipy函数库. 由于用pip install numpy, scipy大概率安装失败(Win下),一个简单的解决方法是安装UCI第三 ...

  10. Oracle 统计量NO_INVALIDATE参数配置(上)

    转载:http://blog.itpub.net/17203031/viewspace-1067312/ Oracle统计量对于CBO执行是至关重要的.RBO是建立在数据结构的基础上的,DDL结构.约 ...