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的時候,生成的圖片有一張出錯,重新生成之后,再運行就沒有問題了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM