ionic build android failure - Execution failed for task processDebugResources

后端 未结 14 1858
有刺的猬
有刺的猬 2020-12-05 17:55

I am using Mac Yosemite. Getting the following failure on running a build for android platform :

FAILURE: Build failed with an exception.

* What went wrong:         


        
相关标签:
14条回答
  • 2020-12-05 18:52

    If you are developing with Windows, it may be because of the "path name". Windows doesn't allow the path name longer than 260 char. So making it shorter may solve it.

    0 讨论(0)
  • 2020-12-05 18:54

    I've got a similar issue. To find a workaround, I've created a new blank project. The compilation and emulation was good. I figure out there were a problem in my www folder. After some multiples test, one of my picture got that name : 'Clément.png". Removing the accent to get 'Clement.png' just fixed my problem.... A lot of pain.

    0 讨论(0)
  • 2020-12-05 18:56

    I don't know why, but my android platform didn't work. Solved the problem by doing :

    ionic platform rm android
    ionic platform add android
    
    0 讨论(0)
  • 2020-12-05 18:57

    I've got this problem on Arch Linux on clean Cordova. To debug this I followed @CapeCorder answer and found that this was missing zlib library. Simply installed it

    sudo pacman -S lib32-zlib

    And works well ;)

    0 讨论(0)
  • 2020-12-05 18:58

    from ionic forum

    It was because of the "ionic resource" service error.

    where run "ionic resource" command, I looked into and checked the /resources/android/splash folder, I clicked and open all of these png files, I found some pictures were broken(which appears as half of it).

    So I replace these broken png files with the "normal" png file(at the same folder), then run "ionic build" command, the error is disappeared.

    https://forum.ionicframework.com/t/ionic-android-build-problem/29131/7?u=bleuscyther

    0 讨论(0)
  • 2020-12-05 18:58

    I use Vue.js and Webpack to generate production files and the output contains *.gz files, which was the problem if put into Cordova's www/.

    0 讨论(0)
提交回复
热议问题