http://blog.ionic.io/crosswalk-comes-to-ionic/
android
Updated as of 4/13/2015git
With our latest CLI update, we’re excited to introduce the ability to package modern rendering engines within your app for Cordova, starting with Crosswalk for Android. Crosswalk provides Android developers a bundled Chrome webview for their projects, resulting in better performance and predictability!github
Our team is passionate about making hybrid mobile development awesome, and we’re so grateful to our committed, enthusiastic community for helping us succeed in our mission.web
First, make sure you get the latest Ionic CLI, and then you can easily create an app, add the Android platform, and add Crosswalk to the project.apache
npm install ionic -g
ionic start my_app
cd my_app
ionic browser add crosswalk
ionic run android
npm install ionic -g
cd existing_app
ionic browser add crosswalk
ionic run android
ionic browser list
#Find the version of Crosswalk you want.ionic browser add crosswalk@10.39.235.15
#Install stable version 10.39.235.15.npm
Update: Previously, you needed an environment variable to build multiple architectures. Due to some changes to the underlying Cordova Android library, you no longer need to specify the environment variable to build multiple APKs. This should happen by default by running ionic build android
.bash
If you have a device connected and run ionic run android
, it will auto detect that architecture type and only build and run for that device.cookie
Please note that running these steps will alter your Android project, so you’ll want to use version control to handle changes from Crosswalk.app
These commands should set you up with a custom Android build with Crosswalk. You can run the project as you normally would.less
To confirm that it was, in fact installed, open Chrome DevTools and confirm that it says 「Chrome 37」 or greater.
We’d love to ask you to help out the cause by testing and giving feedback. This is your chance to help several open source projects at once: Cordova, Crosswalk, and Ionic!
We’ve put together this Q & A to answer questions you might have about Crosswalk. Please don’t hesitate to contact us if you have questions that aren’t answered here!
npm install -g ionic
ionic info
and paste that information to our Ionic CLI issues on githubIt’s really important to us that we keep our users informed about what we’re working on. Here’s a roadmap that covers where we’ve been and where we’re going. Thanks for joining us on the journey!
ionic help serve
.ionic browser add crosswalk@10.39.235.15
.ionic browser list
. NOTE: Only stable releases are allowed for now.ionic upload
.ionic browser add crosswalk
will not re-download the webviews.ionic upload
command – fixed an issue with the cookies from the request.In the last month, the Ionic CLI has updated the version of Cordova Android that it uses to the latest commits. Some of these changes have caused some issues for users.
Users that run ionic platform add android
after running ionic browser add crosswalk
may run into the following issue:
Plugin doesn't support this project's cordova-android version. cordova-android: 3.7.1, failed version requirement: >=4.0.0-dev
When you run ionic browser add crosswalk
, the CLI downloads Cordova Android 4.0.0-dev, along with a Cordova Crosswalk Engine plugin. The Crosswalk plugin requires Cordova Android 4.0.0 and will not work properly without it.
When you run ionic platform add android
, you are then removing Cordova Android 4.0.0 and trying to install Cordova Android 3.7.1 (if you are using the latest Cordova CLI).
Right away, this will fail, due to the Crosswalk engine plugin. If you wish to stop using the Crosswalk plugin, please run ionic browser remove crosswalk
.
If this was unintentional, simply run ionic browser add crosswalk
again to allow the CLI to install that Cordova Android 4.0.0 version. Otherwise, you can run ionic platform add ./engine/cordova-android-c0.6.1
to freshly install the downloaded 4.0.0 version of Cordova Android.
You may also remove the Crosswalk Engine plugin. Find the name ionic plugin ls
and then ionic plugin rm cordova-plugin-crosswalk-webview
.
Using the latest changes from Cordova Android 4.0.0, the Cordova team has removed the Whitelisting capabilities of Cordova to now reside in a whitelist plugin.
This plugin has not been released yet but is required to allow whitelisting to work properly with Cordova android 4.0.
To get around this issue, please install the plugin using this command: ionic plugin add https://github.com/apache/cordova-plugin-whitelist
.
That should temporarily get you around that issue until the Cordova team releases that plugin to the Cordova Plugin registry.