1

I am spending days trying to make my app embedded with crosswalk-lite instead the normal crosswalk. Can anyone that have done it explain the method?

peterh
  • 11,875
  • 18
  • 85
  • 108
Ændri Domi
  • 111
  • 9
  • Please post the code you currently have so that others can help you troubleshoot it. See: http://stackoverflow.com/help/mcve. – twernt Jan 29 '16 at 18:34
  • It's not about code, it's about the fact that crosswalk-lite documentation is not enought clear, it just says to do the same steps of crosswalk but if i follow them then i get the normal binaries.... – Ændri Domi Jan 29 '16 at 18:43
  • Maybe my suggestion in this answer could help you: http://stackoverflow.com/questions/33003505/how-to-install-crosswalk-lite-plugin-using-cordova-cli/33165700#33165700 – beaver Feb 01 '16 at 08:34
  • try this: http://stackoverflow.com/a/42314666/3966458 – Saahithyan Vigneswaran Feb 18 '17 at 11:42

2 Answers2

6

FINALLY I MADE IT !!

First of all the reason why it always goes to download the normal binaries is that the crosswalk-lite is not in official release, but i had no problems with my app so here we go: Go to your project folder than edit this file:

platforms/android/cordova-plugin-crosswalk-webview/yourapp-xwalk.gradle

replace

repositories { maven { url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2' } }

to be

repositories { mavenLocal() }

then add near the line 71 after cdvPluginPostBuildExtras.add({:

def liteSpec = "org.xwalk:xwalk_core_library:1.0.0.1"

and edit the dependecies rule to be

dependencies { compile liteSpec }

remember that 1.0.0.1 is our self created version

Now download from the crosswalk-lite repository the version you want to embed, i have tested with the version 17.46.451.1 , download just the .aar file. This version has both x86 and armv7 reources so you have to unzip the .aar (is actually a zip file ) and then delete the file

res/raw/libxwalkcore.so.x86 [ if you want to make apk for armv7 devices ]

res/raw/libxwalkcore.so.armeabi_v7a [ if you want to make apk for x86 devices ]

this is because it will trigger the error duplicate resources, as i noticed.

Now zip again the folder without the resource and rename it to .aar

And finally the magic touch, (if you haven't installed maven do apt-get install maven2)

mvn install:install-file -Dfile=*YOURFILE*.aar -DgroupId=org.xwalk -DartifactId=xwalk_core_library -Dversion=1.0.0.1 -Dpackaging=aar

Now you can build your app with the crosswalk-lite embbeded, it may seems difficult but it's not , and it worth every mb saved to the apk

Ændri Domi
  • 111
  • 9
  • Great work. It's really sad that Ionic team did not do this upgrade to the cli, even after a lot of complains everywhere – Fernando Fabreti Feb 15 '16 at 18:20
  • A heads up, the later versions of the crosswalk-lite does not have the libraries in `res/raw` , also ran into an issue with building it, there's something else that is missing from what was mentioned in your post. – t0mm13b Mar 16 '16 at 22:25
  • Did you noticed that now you can download aar files with already separated binaries? and what issue did you get? please be more detailed – Ændri Domi Mar 17 '16 at 15:36
  • Are you using a platform like Meteor? I'm afraid of spoil off my meteor project installing a package with maven without using meteor procedure – Ruben May 04 '17 at 03:01
0

1) Crosswalk-lite just added maven server in https://download.01.org/crosswalk/releases/crosswalk-lite/android/maven2/. so you don't need to configure your local maven anymore.

2) In the latest version, there is no more res/raw. Now embedding Lite has no different with embedding crosswalk normal build.

GAMITG
  • 3,810
  • 7
  • 32
  • 51
kehe
  • 1