Initial Commit

Listen, Learn.

Customize Crosswalk for Cordova project

Posted at — May 6, 2016

I’m working on a Ionic project which is deployed to mobile devices via Cordova. For performance and compatibility, I introduced Crosswalk, which is a library embedding a Chrome into the app.

It’s working great and as expected. There is only one problem: the size is too big. It comes about 20MB for each architecture, so ARM and x86 need 40MB, while my app itself is only 10MB.

Fortunately, with Crosswalk-lite, the library size can be reduced by ~50%. The price is disabled features, and decompression at the first time of boot after installed. On my old Galaxy Nexus, the decompression takes ~20 seconds.

Crosswalk-lite seems in immature state, lacking customizations, including the ability to set the title and content of the prompt during the decompression, which is important to me that I want to comfort the users, using Chinese.

I followed the instruction, and successfully compiled a library with customized decompression prompt. I’m writing down some outdated steps, and missing caveats.

Compilation Steps

Usage Steps

repositories {
  maven {
    url xwalkMavenRepo

and the dependencies block, with the full version info.

dependencies {
  compile 'org.xwalk:xwalk_core_library_canary:(version without parenthese)'