1

I'm facing some strange issues. The same project that works on my work computer (ubuntu) is facing some issues working on a mac.

It builds all right, but fails on startup on the device.

Cordova versions - 5.3.3 ionic version - 1.7.0 cordova-android version - 4

E/AndroidRuntime(17996): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tricog.clinic/com.tricog.clinic.MainActivity}: java.lang.RuntimeException: Failed to create webview. 
E/AndroidRuntime(17996):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2190)
E/AndroidRuntime(17996):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2239)
E/AndroidRuntime(17996):    at android.app.ActivityThread.access$800(ActivityThread.java:141)
E/AndroidRuntime(17996):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1202)
E/AndroidRuntime(17996):    at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(17996):    at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(17996):    at android.app.ActivityThread.main(ActivityThread.java:5047)
E/AndroidRuntime(17996):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(17996):    at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(17996):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime(17996):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
E/AndroidRuntime(17996):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(17996): Caused by: java.lang.RuntimeException: Failed to create webview. 
E/AndroidRuntime(17996):    at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:82)
E/AndroidRuntime(17996):    at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:191)
E/AndroidRuntime(17996):    at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:187)
E/AndroidRuntime(17996):    at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:135)
E/AndroidRuntime(17996):    at com.tricog.clinic.MainActivity.onCreate(MainActivity.java:31)
E/AndroidRuntime(17996):    at android.app.Activity.performCreate(Activity.java:5249)
E/AndroidRuntime(17996):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime(17996):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2154)
E/AndroidRuntime(17996):    ... 11 more
E/AndroidRuntime(17996): Caused by: java.lang.ClassNotFoundException: org.crosswalk.engine.XWalkWebViewEngine
E/AndroidRuntime(17996):    at java.lang.Class.classForName(Native Method)
E/AndroidRuntime(17996):    at java.lang.Class.forName(Class.java:251)
E/AndroidRuntime(17996):    at java.lang.Class.forName(Class.java:216)
E/AndroidRuntime(17996):    at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:78)
E/AndroidRuntime(17996):    ... 18 more
E/AndroidRuntime(17996): Caused by: java.lang.NoClassDefFoundError: org/crosswalk/engine/XWalkWebViewEngine
E/AndroidRuntime(17996):    ... 22 more
E/AndroidRuntime(17996): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.crosswalk.engine.XWalkWebViewEngine" on path: DexPathList[[zip file "/data/app/com.tricog.clinic-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.tricog.clinic-1, /vendor/lib, /system/lib]]
E/AndroidRuntime(17996):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/AndroidRuntime(17996):    at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
E/AndroidRuntime(17996):    at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
E/AndroidRuntime(17996):    ... 22 more
W/ActivityManager( 1192):   Force finishing activity com.tricog.clinic/.MainActivity
Abhinav Gujjar
  • 2,570
  • 2
  • 25
  • 35

2 Answers2

0

You can try to remove Crosswalk and reinstall it with this command :

  ionic browser add crosswalk@12.41.296.5

I'm not sure it will fix your trouble but when I worked with Crosswalk I had lot of troubles and I remembered this version worked well.

I hope it will help you.

Useful information :

http://blog.ionic.io/crosswalk-comes-to-ionic/

Grégoire Motot
  • 927
  • 7
  • 10
  • yeah - I fiddled with a bunch of versions of cordova, cordova-android, cordova-ios and something fixed it. I thought hybrid apps are supposed to be easy. Now, I'm just spending more time fixes the builds than writing business functionality – Abhinav Gujjar Oct 19 '15 at 10:25
0

This is working for me :)

ionic add crosswalk

Anil Yadav
  • 1,086
  • 7
  • 18