AS2.2打包:release-stripped.ap_' specified for property 'resourceFile' does not exist

来源:互联网 发布:中超球员数据统计 编辑:程序博客网 时间:2024/05/29 17:42

刚才打包一直提示下面的问题:

Error:A problem was found with the configuration of task ':app:packageBAIDURelease'.> File 'D:\AndroidStudioProjects\CodeBlog\app\build\intermediates\res\resources-BAIDU-release-stripped.ap_' specified for property 'resourceFile' does not exist.

查资料一直提示说disable Instant Run就可以,然而并没有效果。后面Google到AS2.2上的编译打包有变化,与改错误相关的介绍:https://developer.android.com/studio/build/shrink-code.html
这里写图片描述
没有梯子的童鞋看上图
意思是Gradle2.0以上版本minifyEnabled字段为true时已经包含了shrinkResources,即在代码优化时会自动去掉多余资源,所以在打正式包时也不需要设置shrinkResources字段。

3 0