specified for property 'resourceFile' does not exist

本文介绍了解决Gradle在进行app:packageRelease任务时出现的配置错误问题,该问题源于指定的资源文件不存在。文章提供了详细的解决方案,包括在设置中取消勾选Instant Run选项,并将shrinkResources属性设为false。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

FAILURE: Build failed with an exception.



* What went wrong:
A problem was found with the configuration of task ':app:packageRelease'.
> File 'E:\app\build\intermediates\res\resources-release-stripped.ap_' specified for property 'resourceFile' does not exist.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.



原因:Instant Run的功能与shrinkResources不兼容


解决办法:

File --> Settings


取消勾选第一个复选框


点击OK,并将module中的build.gradle中shrinkResources置为false,然后重新编译即可


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值