Converts an existing Cordova/Ionic project to a Crosswalk project. When the script is done running, you should have a fat 40MB APK file in platforms/android/ant-build
.
This assumes you have the following already installed: cordova
, ant
, android
, and that your ANDROID_HOME
is set to point to the Android SDK.
This will work on both x86 and ARM. If you want to build two separate APKs so that they're smaller, then modify the script; the script at least shows how it works.
Step 1: download the "Cordova Android" libraries from the Crosswalk downloads page. You don't need anything except for the "Cordova Android" ones.
Step 2 Unzip them both.
Step 3 Navigate to your project directory and run:
./prepare_crosswalk \
/path/to/crosswalk-cordova-VERSION-x86 \
/path/to/crosswalk-cordova-VERSION-arm
Then run either:
ionic build android # for ionic
or
cordova build android # for cordova
Thanks to this article for figuring out how to get this to work.
You should change line 23 to "cordova platform add [email protected]" instead. 9.38.208.10 is now stable and based on 3.5.1 and cordova @ 3.5 has a high security issue: http://cordova.apache.org/announcements/2014/08/04/android-351.html