packageOfficialDebug和resourceFile does not exist.
来源:互联网 发布:软件项目任务书 编辑:程序博客网 时间:2024/06/11 16:40
原文地址:http://www.jianshu.com/p/b7cdff7fe6e1
Android Studio运行时候报packageOfficialDebug错误
报错信息为
Error:A problem was found with the configuration of task':watch:packageOfficialDebug'.
File '...\build\intermediates\res\resources-official-debug-stripped.ap_' specified for property 'resourceFile' does not exist.
解决方法一:
这个大多数原因是开启了混淆造成的,关闭Debug模式下的混淆开关后重新编译即可,代码如下:
buildTypes { release { buildConfigField("boolean", "LOG_DEBUG", "false") minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { minifyEnabled false shrinkResources false buildConfigField("boolean", "LOG_DEBUG", "true") proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }
minifyEnabled即以前的runProguard,用来控制是否混淆。
shrinkResources为true时自动去掉多余资源。
注:Gradle2.0以上的版本minifyEnabled字段为true时已经包含了shrinkResources,在代码优化时会自动去掉多余资源,所以在打正式包时也不需要设置shrinkResources字段。
解决方法二:
Android Studio2.0以上有了Instant Run功能,很多情况下运行报错都跟Instant Run有关
进入File --> Setting(Ctrl+Alt+S)找到InstantRun功能,把InstantRun功能关闭
阅读全文
0 0
- packageOfficialDebug和resourceFile does not exist.
- 'resourceFile' does not exist.
- specified for property 'resourceFile' does not exist
- 关于productFlavors使用和specified for property 'resourceFile' does not exist.问题
- File xxx specified for property 'resourceFile' does not exist.解决方法
- AS 2.2编译遇到 'resourceFile' does not exist
- release-stripped.ap_' specified for property 'resourceFile' does not exist.
- File xxx specified for property 'resourceFile' does not exist.解决方法
- File xxx specified for property 'resourceFile' does not exist.解决方法
- File xxx specified for property 'resourceFile' does not exist.
- \build\intermediates\res\xxx-stripped.ap_' specified for property 'resourceFile' does not exist
- AS2.2打包:release-stripped.ap_' specified for property 'resourceFile' does not exist
- debug-stripped.ap_' specified for property 'resourceFile' does not exist.处理办法
- AS Error:File xxx specified for property 'resourceFile' does not exist
- 解决 AS2.2正式版 release-stripped.ap_' specified for property 'resourceFile' does not exist.
- 解决:debug-stripped.ap_' specified for property 'resourceFile' does not exist.
- 解决 release-stripped.ap_' specified for property 'resourceFile' does not exist.
- 错误:resources-debug-stripped.ap_' specified for property 'resourceFile' does not exist.
- ArrayList源码分析(1.7.0_80)
- IAR的const,变量指定绝对地址,函数指定存取区域
- hdu1253 胜利大逃亡
- Python3 Scrapy 安装方法
- forName()、newInstance()、getMethod()、getClass()、invoke()理解说明
- packageOfficialDebug和resourceFile does not exist.
- 字符混编---动态规划
- Python3 SciPy解常微分方程 用Matplotlib演示
- 柱状图绘制
- git 使用操作命令
- 预测响应模型的应用
- 初识Spring-boot
- win10 tensorflow-gpu 环境搭建
- CSS中zoom和transform:scale的区别