AS2.2打包时 Error:A problem was found with the configuration of task ':app:package***serviceRelease'. > File 'D:\work\***\app\build\intermediates\res\resources-***-stripped.ap_' specified for property 'resourceFile' does not exist.

错误说明:

AS 2.2后我们打包时会遇到下面这问题
<code>

Error:A problem was found with the configuration of task ':app:packageserviceRelease'.
File 'D:\work*
\app\build\intermediates\res\resources-
**-stripped.ap_' specified for property 'resourceFile' does not exist.
</code>

error.png

解决方案:

去掉release中的shrinkResources字段

shrinkResources.png

解释:

AS 2.2后minifyEnabled=true时包含了shrinkResources=true,即混淆时会自动去掉多余资源,所以我们不需要设置shrinkResources了。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容