/crosswalk-cordova-android

cordova on xwalk-android

Primary LanguageJavaApache License 2.0Apache-2.0

Crosswalk-based Cordova Android

Corsswalk-based Cordova Android is derived from Cordova Android and uses Crosswalk as the HTML5 runtime. It is an Android application library that allows for Cordova-based projects to be built for the Android Platform. Cordova based applications are, at the core, applications written with web technology: HTML, CSS and JavaScript.

Apache Cordova is a project at The Apache Software Foundation (ASF).

Requires

Setup Crosswalk Dependency

Please refer to Setup Crosswalk Dependency.

Cordova Android Developer Tools

The Cordova developer tooling is split between general tooling and project level tooling.

General Commands

./bin/create [path package activity] ... create the ./example app or a cordova android project
./bin/check_reqs ....................... checks that your environment is set up for cordova-android development
./bin/update [path] .................... updates an existing cordova-android project to the version of the framework

Project Commands

These commands live in a generated Cordova Android project. Any interactions with the emulator require you to have an AVD defined.

./cordova/clean ........................ cleans the project
./cordova/build ........................ calls `clean` then compiles the project
./cordova/log   ........................ stream device or emulate logs to stdout
./cordova/run   ........................ calls `build` then deploys to a connected Android device. If no Android device is detected, will launch an emulator and deploy to it.
./cordova/version ...................... returns the cordova-android version of the current project

Importing a Crosswalk-based Cordova Android Project into Eclipse

Please use ./cordova/build to build before import generated project into Eclipse.

  1. Import Crosswalk-based Cordova Android and XWalkCoreLibrary library projects by File > Import... > Existing Android Code Into Workspace. Point to [path_to_cordova_xwalk_android]/framework and click Finish.
  2. Build xwalk_core_library and Cordova projects.
  3. Import generated project by File > Import... > Existing Android Code. Point to the generated app path.
  4. Right click on the project root: Run as > Run Configurations
  5. Click on the Target tab and select Manual (this way you can choose the emulator or device to build to)

Running Tests

Please see details under test/README.md.

Further Reading