Reputation: 111
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?
Upvotes: 1
Views: 2186
Reputation: 1
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.
Upvotes: 0
Reputation: 111
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
Upvotes: 6