Error adding Crosswalk


#1

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!


#2

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


#3

Having the same issue after a clean install.


#4

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

#5

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?


#6

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


#7

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


#8

The workaround worked great - thank you!


#9

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


#10

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.


#11

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:


#12

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”