Ionic: Execution failed for task ':mergeDebugResources' (Some file crunching failed)

前端 未结 9 723
慢半拍i
慢半拍i 2021-01-14 02:00

Ionic build command was working fine until I decided to add some custom splash screen and run the following command,

ionic resources

9条回答
  •  一向
    一向 (楼主)
    2021-01-14 02:30

    After going through multiple online resources, I found that ionic resources processes/optimizes the resultant PNG files. Post that, when you run ionic build android command, Android build itself tries to work on already processed/optimized Splash screens but it doesn't work well and it reports an error.

    So, the fix is to tell Android Build not to touch those PNG files at all and go ahead with what it is given. How to do that?

    Put cruncherEnabled = false in platforms\android\build.gradle file as below,

    android {

    aaptOptions {
    cruncherEnabled = false
    }

    ...

    Re-run the build and it goes through without any problem! :)

提交回复
热议问题