刚才打包一直提示下面的问题:
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
字段。