app crashes after hacking cordova-plugin-crosswalk-webview to include crosswalk-lite

1.5k views Asked by At

I am trying to add crosswalk-lite to my cordova project using cordova-plugin-crosswalk-webview. I created a maven repos of https://download.01.org/crosswalk/releases/crosswalk-lite/android/canary/10.39.237.1/arm/crosswalk-webview-10.39.237.1-arm.zip on my github page, and modified xwalk.gradle pointing my maven. Building is OK, apk file size also looks as expected.

cordova plugin add https://github.com/Poordeveloper/cordova-plugin-crosswalk-webview

But app crashes with.

   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2396)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2448)
    at android.app.ActivityThread.access$600(ActivityThread.java:173)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1392)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:194)
    at android.app.ActivityThread.main(ActivityThread.java:5469)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:525)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:857)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
    at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.RuntimeException: Failed to create webview.
    at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:82)
    at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:191)
    at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:187)
    at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:135)
    at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:209)
    at com.carriez.carbroker.MainActivity.onCreate(MainActivity.java:32)
    at android.app.Activity.performCreate(Activity.java:5226)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1151)
    at com.lbe.security.service.core.client.b.x.callActivityOnCreate(Unknown Source)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2360)
    ... 11 more
 Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Constructor.constructNative(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
    at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:80)
    ... 20 more
 Caused by: junit.framework.AssertionFailedError: Please extend XWalkActivity for shared mode
    at junit.framework.Assert.fail(Assert.java:50)
    at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:112)
    at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:105)
    at org.crosswalk.engine.XWalkCordovaView.setGlobalPrefs(XWalkCordovaView.java:41)
    at org.crosswalk.engine.XWalkCordovaView.<init>(XWalkCordovaView.java:50)
    at org.crosswalk.engine.XWalkWebViewEngine.<init>(XWalkWebViewEngine.java:56)
    ... 23 more

Wondering if anyone can help on this.

0

There are 0 answers