本文介绍了任务':app:mergeReleaseResources' 构建APK 的错误执行失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试构建 APK 并修复错误后,我再次执行 ./gradlew assembleRelease 时出错:任务 ':app:mergeReleaseResources' 构建 APK 执行失败

After trying to build APK once and fixing an error, I got an error executing ./gradlew assembleRelease again: Execution failed for task ':app:mergeReleaseResources' building APK

推荐答案

出现问题是因为当我尝试构建一次时,它在 android/app/src/main/res/.然后当我第二次尝试时,它向我显示了这个错误 Execution failed for task ':app:mergeReleaseResources' building APK

The problem occured becaused when I tried to build once, it has created drawables dirs on android/app/src/main/res/. Then when I tried on second time, it has shown me this error Execution failed for task ':app:mergeReleaseResources' building APK

我刚刚删除了 drawable-* 目录并且它起作用了.

I just deleted the drawable-* dirs and it worked.

希望有帮助!

rm -rf android/app/src/main/res/drawable-*

这篇关于任务':app:mergeReleaseResources' 构建APK 的错误执行失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 05:35