Building a cordova app with Polymer run into failure


I am working on a Meteor cordova app.
Today I tried to add polymer to my app using:
meteor add boxxa:polymer
meteor add boxxa:polymer-paper

For build the APK file I use the following script:


rm -rf .meteor/local/cordova-build/
meteor reset

rm -rf $BUILD_NAME
meteor build $BUILD_NAME --server

cd $BUILD_NAME/android
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 unaligned.apk MwsTester

~/.meteor/android_bundle/android-sdk/build-tools/20.0.0/zipalign 4 unaligned.apk MwsTester.apk

This worked fine before I added poylmer. Now I get after a long time building the project:

Error: The APK file for the Android build was not found.
    at findApkPath (/Users/doedel/.meteor/packages/meteor-tool/.
    at /Users/doedel/.meteor/packages/meteor-tool/.
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/doedel/.meteor/packages/meteor-tool/.
    at buildCommand (/Users/doedel/.meteor/packages/meteor-tool/.
    at [as func] (/Users/doedel/.meteor/packages/meteor-tool/.
    at /Users/doedel/.meteor/packages/meteor-tool/.
Enter Passphrase for keystore: Unable to open 'unaligned.apk' as zip archive

The server tar.gz file was created. Around 30 MB.

I also use

I think the app becomes to BIG with polymer.


I made a very small meteor project to reproduce this issue:

Build iOS is OK !

I also updated the android sdk and tools using
meteor configure-android


I have the exact same problem. I use polymer 0.5 in my project, but not through any pacakges. Same problem with or without differential:vulcanize.


@n0mn0m what do thing: Is it a meteor or cordova problem ?

I read, that phonegap / cordova can’t handle html imports.


Well, I pulled Polymer/Paper-checkbox by bower into public folder and this is running OK on android emulator:

  <script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
  <link rel="import" href="bower_components/paper-checkbox/paper-checkbox.html">

  <h1>Welcome to Meteor!</h1>


@doedel I made a similar testcase as you, but I used bower to get the polymer packages. There was one package that broke the build, and that was paper-dialog. After a little digging, I found that the actual package was the web-animation-js. Inside that folder there was a file called web-animations.min.js.gz, and when I deleted that one it built fine.

I am not sure why you would get this error and I still get it in my non-test project. I will post my findings if I figure out any more.


Polymer runs fine in the Android emulator, but this is just ok for testing.
For the real thing, it must run on the device.


I’ve been in the same issue, but I’m not using polymer…


Sometimes it helps to remove the meteor installation .meteor in user home.
Then re-install the android sdk with all settings on default.

But this dont fix the issues with polymer :grin:


Does anyone are using Facebook Connect cordova plugin? Because in my case, it was solved days ago, take a look:

But I don’t know why this is happening again…after remove facebook connect my build came back to normal…


Awsome! I was able to run my project by deleting web-animations.min.js.gz from the \public\bower_components\web-animations-js\web-animations.min.js.gz.

It now compiles for Android.