Execution failed for task ':app:processProdReleaseResources'.
> AAPT2 aapt2-3.2.1-4818971-windows Daemon #0: Unexpected error during link, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does
这个编译bug ,真是找到崩溃。开启混淆就打包编译报错,关闭混淆就正常运行
出现的原因:res包下的没有用到的资源在开启混淆后莫名报错:比如常见的@+id/title_right title_right不存在
解决方案:删除无用资源。
步骤如下:在Android Studio中选择菜单“Analyze” --> “Run inspaction by Name …”。在弹出的搜索窗口中输入想执行的检查类型,如“Unused Resources”。
点开后输入Unused res