FAILURE: Build failed with an exception. Crunching Cruncher screen.png failed

Posted Viola_left

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了FAILURE: Build failed with an exception. Crunching Cruncher screen.png failed相关的知识,希望对你有一定的参考价值。

自己测试ionic的模板项目cutePuppyPics时,按照https://github.com/driftyco/ionic/blob/2.0/CHANGELOG.md#angular-update-to-200-rc1  升级Angularjs版本后,运行cordova build android 编译项目时总是报如下错

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task \':mergeDebugResources\'.
> Some file crunching failed, see logs for details

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

BUILD FAILED

Total time: 4.738 secs
Error: Error code 1 for command: cmd with args: /s,/c,"G:\\Viola\\cutePuppyPics\\platforms\\android\\gradlew cdvBuildDe
bug -b G:\\Viola\\cutePuppyPics\\platforms\\android\\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=t
rue"

再试试运行ionic build android,报错信息如下:

:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResourcesAAPT err(Facade for 127747075): libpng error: Read Error
FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task \':mergeDebugResources\'.
> Crunching Cruncher screen.png failed, see logs

* Try:

BUILD FAILED

Total time: 3.835 secs
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: Error code 1 for command: cmd with args: /s,/c,"G:\\Viola\\cutePuppyPics\\platforms\\android\\gradlew cdvBuildDe
bug -b G:\\Viola\\cutePuppyPics\\platforms\\android\\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=t
rue"

最后原因竟然是因为在运行ionic resources的时候,生成的图片有一张出错,重新生成之后,再运行就没有问题了。

以上是关于FAILURE: Build failed with an exception. Crunching Cruncher screen.png failed的主要内容,如果未能解决你的问题,请参考以下文章

Jenkins Android Build Error: FAILURE: Build failed with an exception

Android Studio 3.3:Gradle Build Sync 消息是错误 FAILURE: Build failed with an exception

如何解决错误 FAILURE: Build failed with an exception。 * 其中:脚本 'C:\flutter\packages\flutter_tools\gradle\fl

Ionic 3 Android Failed Build Manifest 合并失败

安卓真机或者模拟器运行安装应用时提示 Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res

BUILD FAILED in 6s Exception: Gradle task assembleDebug failed with exit code 1