Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using module #18

Open
dmordave opened this issue Jan 25, 2016 · 7 comments
Open

Error when using module #18

dmordave opened this issue Jan 25, 2016 · 7 comments

Comments

@dmordave
Copy link

Hi,

After installing the module I get this error when starting my app with Titanium SDK 5.1.2.GA

I tried adding
armeabi-v7a

Any ideas?

[INFO] :   TiApplication: (main) [0,0] checkpoint, app created.
[INFO] :   TiApplication: (main) [31,31] Titanium 5.1.2 (2015/12/16 19:00 ca822b2)
[INFO] :   TiApplication: (main) [37,68] Titanium Javascript runtime: v8
[ERROR] :  art: No implementation found for boolean org.xwalk.core.internal.XWalkViewDelegate.nativeIsLibraryBuiltForIA() (tried Java_org_xwalk_core_internal_XWalkViewDelegate_nativeIsLibraryBuiltForIA and Java_org_xwalk_core_internal_XWalkViewDelegate_nativeIsLibraryBuiltForIA__)
[INFO] :   art: Starting a blocking GC HeapTrim
[ERROR] :  TiApplication: (main) [30,98] Sending event: exception on thread: main msg:junit.framework.AssertionFailedError: Please have your activity extend XWalkActivity for shared mode; Titanium 5.1.2,2015/12/16 19:00,ca822b2
[ERROR] :  TiApplication: junit.framework.AssertionFailedError: Please have your activity extend XWalkActivity for shared mode
[ERROR] :  TiApplication:   at junit.framework.Assert.fail(Assert.java:50)
[ERROR] :  TiApplication:   at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:189)
[ERROR] :  TiApplication:   at org.xwalk.core.XWalkPreferences.reflectionInit(XWalkPreferences.java:207)
[ERROR] :  TiApplication:   at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:97)
[ERROR] :  TiApplication:   at com.universalavenue.ticrosswalk.TiCrosswalkModule.onAppCreate(TiCrosswalkModule.java:47)
[ERROR] :  TiApplication:   at ca.qc.laval.stl.stllivev1.StlSynchroPlusApplication.onCreate(StlSynchroPlusApplication.java:133)
[ERROR] :  TiApplication:   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
[ERROR] :  TiApplication:   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
[ERROR] :  TiApplication:   at android.app.ActivityThread.-wrap1(ActivityThread.java)
[ERROR] :  TiApplication:   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
[ERROR] :  TiApplication:   at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] :  TiApplication:   at android.os.Looper.loop(Looper.java:148)
[ERROR] :  TiApplication:   at android.app.ActivityThread.main(ActivityThread.java:5417)
[ERROR] :  TiApplication:   at java.lang.reflect.Method.invoke(Native Method)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[WARN] :   V8Object: (KrollRuntimeThread) [50,148] Runtime disposed, cannot set property 'userAgent'
[ERROR] :  TiApplication: (KrollRuntimeThread) [12,160] Sending event: exception on thread: KrollRuntimeThread msg:java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/ca.qc.laval.stl.stllivev1-1/base.apk"],nativeLibraryDirectories=[/data/app/ca.qc.laval.stl.stllivev1-1/lib/x86, /data/app/ca.qc.laval.stl.stllivev1-1/base.apk!/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libcom.universalavenue.ticrosswalk.so"; Titanium 5.1.2,2015/12/16 19:00,ca822b2
[ERROR] :  TiApplication: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/ca.qc.laval.stl.stllivev1-1/base.apk"],nativeLibraryDirectories=[/data/app/ca.qc.laval.stl.stllivev1-1/lib/x86, /data/app/ca.qc.laval.stl.stllivev1-1/base.apk!/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libcom.universalavenue.ticrosswalk.so"
[ERROR] :  TiApplication:   at java.lang.Runtime.loadLibrary(Runtime.java:367)
[ERROR] :  TiApplication:   at java.lang.System.loadLibrary(System.java:1076)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:132)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:99)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:185)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:109)
@app2one
Copy link

app2one commented Mar 14, 2016

Same here. Any solution?

@jonatansberg
Copy link
Contributor

What device are you using? By the looks of the logs it seems like you're on a x86 unit/emulator/simulator, like Genymotion. Adding x86 as a target should help.

@app2one
Copy link

app2one commented Mar 14, 2016

I have tried in an ARM Phone just now. But seems getting same result. Details below.

Phone Model : H30-U10
Android Version : 4.2.2
Ti SDK : 5.2.0
com.universalavenue.ticrosswalk : 1.3.0
node : 4.3.0

-- Start application log -----------------------------------------------------
[ERROR] : cutils: to chown(/mnt/shell/emulated/0, 0, 0)
[ERROR] : cutils: to chown(/mnt/shell/emulated/obb, 0, 0)
[ERROR] : cutils: to chown(/storage/emulated/0/Android, 0, 0)
[ERROR] : cutils: to chown(/storage/emulated/0/Android/obb, 0, 0)
[WARN] : asset: AssetManager-->addDefaultAssets CIP path not exsit!
[INFO] : TiApplication: (main) [0,0] checkpoint, app created.
[INFO] : Project built successfully in 44s 37ms
[INFO] : TiApplication: (main) [242,242] Titanium 5.2.0 (2016/02/20 08:05 384775e)
[INFO] : TiApplication: (main) [270,512] Titanium Javascript runtime: v8
[WARN] : dalvikvm: No implementation found for native Lorg/xwalk/core/internal/XWalkViewDelegate;.nativeIsLibraryBuiltForIA:()Z
[WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41e039a8)
[WARN] : dalvikvm: threadid=1: uncaught exception occurred
[WARN] : W/System.err: junit.framework.AssertionFailedError: Please have your activity extend XWalkActivity for shared mode
[WARN] : W/System.err: at junit.framework.Assert.fail(Assert.java:50)
[WARN] : W/System.err: at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:189)
[WARN] : W/System.err: at org.xwalk.core.XWalkPreferences.reflectionInit(XWalkPreferences.java:207)
[WARN] : W/System.err: at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:97)
[WARN] : W/System.err: at com.universalavenue.ticrosswalk.TiCrosswalkModule.onAppCreate(TiCrosswalkModule.java:47)
[WARN] : W/System.err: at com.app2one.whatsweb.WhatswebApplication.onCreate(WhatswebApplication.java:83)
[WARN] : W/System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1065)
[WARN] : W/System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4693)
[WARN] : W/System.err: at android.app.ActivityThread.access$1300(ActivityThread.java:169)
[WARN] : W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
[WARN] : W/System.err: at android.os.Handler.dispatchMessage(Handler.java:107)
[WARN] : W/System.err: at android.os.Looper.loop(Looper.java:194)
[WARN] : W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5433)
[WARN] : W/System.err: at java.lang.reflect.Method.invokeNative(Native Method)
[WARN] : W/System.err: at java.lang.reflect.Method.invoke(Method.java:525)
[WARN] : W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:924)
[WARN] : W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:691)
[WARN] : W/System.err: at dalvik.system.NativeStart.main(Native Method)
[WARN] : dalvikvm: threadid=1: calling UncaughtExceptionHandler
[ERROR] : TiApplication: (main) [43,555] Sending event: exception on thread: main msg:junit.framework.AssertionFailedError: Please have your activity extend XWalkActivity for shared mode; Titanium 5.2.0,2016/02/20 08:05,384775e
[ERROR] : TiApplication: junit.framework.AssertionFailedError: Please have your activity extend XWalkActivity for shared mode
[ERROR] : TiApplication: at junit.framework.Assert.fail(Assert.java:50)
[ERROR] : TiApplication: at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:189)
[ERROR] : TiApplication: at org.xwalk.core.XWalkPreferences.reflectionInit(XWalkPreferences.java:207)
[ERROR] : TiApplication: at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:97)
[ERROR] : TiApplication: at com.universalavenue.ticrosswalk.TiCrosswalkModule.onAppCreate(TiCrosswalkModule.java:47)
[ERROR] : TiApplication: at com.app2one.whatsweb.WhatswebApplication.onCreate(WhatswebApplication.java:83)
[ERROR] : TiApplication: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1065)
[ERROR] : TiApplication: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4693)
[ERROR] : TiApplication: at android.app.ActivityThread.access$1300(ActivityThread.java:169)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:107)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:194)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5433)
[ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:525)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:924)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:691)
[ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)
[WARN] : dalvikvm: threadid=1: calling UncaughtExceptionHandler done
[WARN] : V8Object: (KrollRuntimeThread) [188,743] Runtime disposed, cannot set property 'userAgent'
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasCameraPermission
[WARN] : dalvikvm: VFY: unable to resolve virtual method 249: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasStoragePermission
[WARN] : dalvikvm: VFY: unable to resolve virtual method 249: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.media.MediaModule.hasCameraPermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 249: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[INFO] : dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method ti.modules.titanium.media.MediaModule.requestCameraPermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 302: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
[INFO] : dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method ti.modules.titanium.filesystem.FilesystemModule.hasStoragePermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 249: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
[INFO] : dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method ti.modules.titanium.filesystem.FilesystemModule.requestStoragePermissions
[WARN] : dalvikvm: VFY: unable to resolve virtual method 302: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
[WARN] : dalvikvm: threadid=10: thread exiting with uncaught exception (group=0x41e039a8)
[WARN] : dalvikvm: threadid=10: uncaught exception occurred
[WARN] : W/System.err: java.lang.UnsatisfiedLinkError: Couldn't load com.universalavenue.ticrosswalk from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.app2one.whatsweb-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.app2one.whatsweb-2, /vendor/lib, /system/lib, /data/datalib]]]: findLibrary returned null
[WARN] : W/System.err: at java.lang.Runtime.loadLibrary(Runtime.java:366)
[WARN] : W/System.err: at java.lang.System.loadLibrary(System.java:514)
[WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:132)
[WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:99)
[WARN] : W/System.err: at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:205)
[WARN] : W/System.err: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:114)
[WARN] : dalvikvm: threadid=10: calling UncaughtExceptionHandler
[ERROR] : TiApplication: (KrollRuntimeThread) [72,815] Sending event: exception on thread: KrollRuntimeThread msg:java.lang.UnsatisfiedLinkError: Couldn't load com.universalavenue.ticrosswalk from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.app2one.whatsweb-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.app2one.whatsweb-2, /vendor/lib, /system/lib, /data/datalib]]]: findLibrary returned null; Titanium 5.2.0,2016/02/20 08:05,384775e
[ERROR] : TiApplication: java.lang.UnsatisfiedLinkError: Couldn't load com.universalavenue.ticrosswalk from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.app2one.whatsweb-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.app2one.whatsweb-2, /vendor/lib, /system/lib, /data/datalib]]]: findLibrary returned null
[ERROR] : TiApplication: at java.lang.Runtime.loadLibrary(Runtime.java:366)
[ERROR] : TiApplication: at java.lang.System.loadLibrary(System.java:514)
[ERROR] : TiApplication: at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:132)
[ERROR] : TiApplication: at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:99)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:205)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:114)
[WARN] : dalvikvm: threadid=10: calling UncaughtExceptionHandler done

@jonatansberg
Copy link
Contributor

Interesting. Please make sure you have the following <abi> element in your tiapp.xml file as well:

[...]
<android xmlns:android="http://schemas.android.com/apk/res/android">
  <abi>armeabi-v7a,x86</abi>
[...]

@app2one
Copy link

app2one commented Mar 14, 2016

It works after adding armeabi-v7a,x86

Both ARM and x86 works now. Thanks.

Jonatan Lundin [email protected] 於 2016年3月14日 下午6:43 寫道:

Interesting. Please make sure you have the following element in your tiapp.xml file as well:

armeabi-v7a,x86 [...] — Reply to this email directly or view it on GitHub https://github.com//issues/18#issuecomment-196249957.

@bemusementpark
Copy link

That helped. You should add this to the README.

Other modules that use native code don't suffer from this issue.

e.g. ti.imagefactory 2.2.2
that also has an armeabi target

@jonatansberg
Copy link
Contributor

For each abi target you add the final apk size increases with 20-30 MB since Crosswalk is a huge dependency. If we target armeabi-v7a the library works on all major mobile devices, which has been good enough tradeoff for our use case.

The default could perhaps be updated to include x86 as well now though, since the APK size limit has been increased to a 100 MB instead of just 50 MB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants