Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Polymer with Bower causes build to fail in Cordova

I'm using bower to download and manage all the polymer components. However after adding the "bower_components" folder, Cordova can no longer build successfully.

:processDebugResources
      Unable to add 'C:\...\platforms\android\build\intermediates\assets\debug\www\bower_components\web-animations-js\web-animations.min.js.gz': file already in archive (try '-u'?)
ERROR: unable to process assets while packaging 'C:\...\platforms\android\build\intermediates\res\resources-debug.ap_'
ERROR: packaging of 'C:\...\platforms\android\build\intermediates\res\resources-debug.ap_' failed
:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugResources'.
 .......
Error Code:
        1
Output:
              Unable to add 'C:\...\platforms\android\build\intermediates\assets\debug\www\bower_components\web-animations-js\web-animations.min.js.gz': file already in archive (try '-u'?)
        ERROR: unable to process assets while packaging 'C:\...\platforms\android\build\intermediates\res\resources-debug.ap_'
        ERROR: packaging of 'C:\...\platforms\android\build\intermediates\res\resources-debug.ap_' failed


* 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: 13.038 secs

It seems like it's because of the .gz file in /web-animations-js.

Anyway, there are also a lot of files and folders that should be removed, such as those "test" and "demo" folders, which is included when I download the components with bower.

How should I solve this problem?

like image 958
Derek 朕會功夫 Avatar asked Jun 09 '15 03:06

Derek 朕會功夫


1 Answers

I deleted the .gz file you mentioned and got it to work. I'm not exactly sure what the complete solution is.

like image 94
Francis Lalnunmawia Avatar answered Oct 14 '22 23:10

Francis Lalnunmawia