android - 应用程序 :mergeReleaseResources exception when making release build

标签 android android-studio android-gradle-plugin release-builds

我能够创建调试版本,但发布版本失败,出现 app:mergeReleaseResources 和错误:java.util.concurrent.ExecutionException:异常。 我已经尝试关闭 progaurd,删除任何损坏的 png 文件,但仍然会出现同样的问题。知道这里出了什么问题或如何找到原因吗?

最佳答案

通过在终端中使用这个命令 gradlew --scan assembleRelease 解决了这个问题,它 它给了我以下错误:D:\Freelance Work\InstaConnect\app\src\main\res\drawable-nodpi\blacktoblue_gradient.png: error: failed to read PNG signature: file does not start with th PNG signature.

一旦我更正了那个文件,它就起作用了。

关于android - 应用程序 :mergeReleaseResources exception when making release build,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51220827/

相关文章:

android - "This app won' t 运行,除非您更新 google play 服务"警报

android - "Deploy as instant app"复选框被禁用

当 float 操作按钮位于布局中时,Android Studio 预览不显示

android - 无法通过usb调试安装android应用

android - 系统找不到指定的文件Gradle Android

android - Google Play 发布同名应用

android - JSON 解析数据未显示在 android textview 中

android - 将文件保存到手机而不是 SD 卡

c# - 统一 5 错误 : Failed to re-package resources

Android Studio - 在 build.gradle 文件中更改 applicationId