Error adding Crosswalk

I’m having an issue adding Crosswalk to an existing Ionic project - think I’m overlooking something simple here but having trouble figuring it out

I’m using this command to add Crosswalk:

ionic browser add crosswalk

Here is the output:

Adding crosswalk browser
You are running Cordova CLI 5.1.1 - installing Cordova Android and Crosswalk man
ually

Downloaded cordova-crosswalk-engine

Downloaded Cordova Android for Crosswalk

Copying over Crosswalk Webview (arm) to the Crosswalk Engine

Finished copying Crosswalk Webview (arm) to the Crosswalk Engine

Copying over Crosswalk Webview (x86) to the Crosswalk Engine

Finished copying Crosswalk Webview (x86) to the Crosswalk Engine

Downloaded Crosswalk webviews

Removed old Cordova Android platform
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: com.ionicframework.okarito967056
        Name: okarito
        Activity: MainActivity
        Android target: android-21
Copying template files...
Android project created with cordova-android@4.0.0-dev
add to body class: platform-android
4.0.0-dev
 ?
An error with adding Crosswalk browser occured Error: There was an error adding
the Cordova Android library
There was an error adding the platform:TypeError: Invalid Version:

Error: There was an error adding the Cordova Android library
There was an error adding the platform:TypeError: Invalid Version:
    at C:\Users\metoyers\AppData\Roaming\npm\node_modules\ionic\node_modules\ion
ic-app-lib\lib\browser.js:332:11
    at _rejected (C:\Users\metoyers\AppData\Roaming\npm\node_modules\ionic\node_
modules\q\q.js:797:24)
    at C:\Users\metoyers\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q
.js:823:30
    at Promise.when (C:\Users\metoyers\AppData\Roaming\npm\node_modules\ionic\no
de_modules\q\q.js:1035:31)
    at Promise.promise.promiseDispatch (C:\Users\metoyers\AppData\Roaming\npm\no
de_modules\ionic\node_modules\q\q.js:741:41)
    at C:\Users\metoyers\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q
.js:557:44
    at flush (C:\Users\metoyers\AppData\Roaming\npm\node_modules\ionic\node_modu
les\q\q.js:108:17)
    at process._tickCallback (node.js:355:11)

There was an error adding the Cordova Android library
There was an error adding the platform:TypeError: Invalid Version:  (CLI v1.5.3)


Your system information:

Cordova CLI: 5.1.1
Ionic Version: 1.0.0
Ionic CLI Version: 1.5.3
Ionic App Lib Version: 0.2.0
OS: Windows 7 SP1
Node Version: v0.12.4

There sppears to be a version conflict of some sort. Is there a workaround?

Thanks for the help!

1 Like

Have you ever try to update cordova to latest version like this link?

Having the same issue after a clean install.

Gave those instructions a shot, but Cordova already appears to be at the latest (5.1.1):

Cordova CLI: 5.1.1
Ionic Version: 1.0.0
Ionic CLI Version: 1.5.3
Ionic App Lib Version: 0.2.0
OS: Windows 7 SP1
Node Version: v0.12.4

This is a huge problem. I’ve tried with all the browsers. One thing I find weird is that I see this:

Copying template files…
Android project created with cordova-android@4.0.0-dev
add to body class: platform-android
4.0.0-dev

I’m using 4.0.2, not 4.0.0-dev. Any idea what needs to be updated?

Hmm, just tested this out too. It seems to be an issue with cordova 5.1.1.
I’d try downgrading to cordova 5.0.

I’ve opened an issue for this.

Short term fix. Since crosswalk is now fully supported by cordova and there is no need to patch things with the ionic cli, you can install the plugin directly.

$ ionic plugin add cordova-plugin-crosswalk-webview

This will do the same thing as ionic browser add

1 Like

Thanks for the suggestion @mharington, I’ll give it a try and revert.

The workaround worked great - thank you!

This was fixed in 1.5.4. Please try that and let me know.

1 Like

I can confirm that going back to Cordova 5.0.0 has solved the problem and my build is working again. Thanks for the suggestion. The Ionic community rocks! Always quick to sort things out.

I’m having this issue with Ionic CLI version 1.5.5 and Cordova version 4.3.0. I tried @mhartington suggestion but it isn’t working.

I’ve referenced the issue here:

A work around is to downgrade the Ionic CLI to 1.5.0 with “npm uninstall ionic -g” and then “npm install ionic@1.5.0 -g”