IONIC CLI3.0 Build Failed on an existing project

Hi,
I have an existing working project and i want to run it via the ionic cli 3.0 but its not working. The error i am getting is

 :mergeDebugResources
    Error: Failed to crunch file C:\Users\sd0003\Documents\ionicTesting\DaveyProject\daveymobilev1\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\10.2.6\res\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png into C:\Users\sd0003\Documents\ionicTesting\DaveyProject\daveymobilev1\platforms\android\build\intermediates\res\merged\debug\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png
    :mergeDebugResources FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':mergeDebugResources'.
    > Error: Failed to crunch file C:\Users\sd0003\Documents\ionicTesting\DaveyProject\daveymobilev1\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\10.2.6\res\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png into C:\Users\sd0003\Documents\ionicTesting\DaveyProject\daveymobilev1\platforms\android\build\intermediates\res\merged\debug\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png

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

I did IONIC CORDOVA RESOURCES and it still gives me the same error.
I removed Platforms folder and did IONIC CORDOVA BUILD ANDROID also.
I removed NODE_MODULES Folder and did NPM INSTALL as well.
It works when creating a new project.

Ionic Info Output:
$ ionic info

global packages:

@ionic/cli-utils : 1.0.0
Cordova CLI      : 7.0.0
Ionic CLI        : 3.0.0

local packages:

@ionic/cli-plugin-cordova : 1.3.0
@ionic/cli-plugin-ionic1  : 1.3.0
Cordova Platforms         : android 6.2.3
Ionic Framework           : ionic1 1.3.2

System:

Node       : v6.10.3
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

Thanks
Sourav

1 Like

What’s your ionic info output?
Try removing and re-adding the Android platform. That doesn’t look like a problem caused by anything from you.

Updated with all details.

I would advise you to update… everything. Cordova to 7.0.1, Ionic CLI to 3.3.0, cli-utils to whatever is current. Doesn’t have to help, but probably won’t hurt either.

If you are using nvm-windows you can just to it on another node install.

@Sujan12 I copied everything to a new project. However, i want to know what are the new commands for Updating everything, The commands that i use dont update anything.

npm install -g ionic cordova @ionic/cli-utils should work.

1 Like

I found the fix
It was due to long directory paths.

Oh that is still a thing? Damn… Sometimes Windows is really silly.

1 Like

A post was split to a new topic: :mergeDebugResources’. > Error: Failed to crunch file