Skip to content
This repository was archived by the owner on Apr 3, 2020. It is now read-only.

Using Cordova CLI with cordova xwalk android (Not Ready)

Ningxin Hu edited this page Dec 3, 2013 · 1 revision

Developers are able to use standard Cordova command line interface (CLI) with cordova-xwalk-android.

Install Cordova CLI.

Please refer to Cordova CLI Document for detailed instructions.

Please install 3.0.0, as:

$ sudo npm install -g [email protected]

Install cordova-xwalk-android container

First, please replace the original Cordova android container URL with cordova-xwalk-android container URL. You need to modify platforms.js at /usr/local/lib/node_modules/cordova/platforms.js, the sudo permission might be required. Change the url attribute of android to cordova-xwalk-android release (cordova.tar.gz) URL.

For example:

    "android" : {
        parser : "./src/metadata/android_parser",
        url    : "http://example.com/cordova.tar.gz?",
        version: "3.0.0"
    },

Please find latest cordova-xwalk-android build at:

Don't forget to append a question mark ? at the end of the URL string.

After change the URL, please remove folder ~/.cordova/lib/android/ to force CLI to re-fetch android platform at the next time.

After these, you could use CLI as documented. The android platform will use cordova-xwalk-android container. For example:

$ cordova create hello com.example.hello HelloWorld
$ cd hello
$ cordova platform add android
$ cordova build android
$ cordova run android