We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi guys I need to implement Ketai library (or whatever library for gestures like directional swipe, double tap and long tap) in Eclipse (because apps works better and I need libpd).
It is for an universitary project and it's the first time I develop on Android using Processing in Eclipse.
I am now trying an app based on "Gestures" example that is in Ketai library in processing. It works on Processing, but when I try to use it on Eclipse it works and install the app, it runs, but when I tap the screen it crashes and give me a brunch of errors in logcat.
10-30 17:07:12.681: E/InputEventReceiver(13350): Exception dispatching input event. 10-30 17:07:12.681: E/MessageQueue-JNI(13350): Exception in MessageQueue callback: handleReceiveCallback 10-30 17:07:12.681: E/MessageQueue-JNI(13350): java.lang.NoClassDefFoundError: ketai.ui.KetaiGesture 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at com.rj.yayprocpd.YayProcessingPD.surfaceTouchEvent(YayProcessingPD.java:265) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at processing.core.PApplet$SketchSurfaceViewGL.onTouchEvent(Unknown Source) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.View.dispatchTouchEvent(View.java:7384) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2211) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1912) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2211) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1912) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2211) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1912) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1975) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1418) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.app.Activity.dispatchTouchEvent(Activity.java:2435) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1922) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.View.dispatchPointerEvent(View.java:7564) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3883) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3778) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3483) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3406) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3540) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3406) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5419) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5399) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5370) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5493) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:182) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.os.MessageQueue.nativePollOnce(Native Method) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.os.MessageQueue.next(MessageQueue.java:132) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.os.Looper.loop(Looper.java:124) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at android.app.ActivityThread.main(ActivityThread.java:5303) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at java.lang.reflect.Method.invokeNative(Native Method) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at java.lang.reflect.Method.invoke(Method.java:525) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 10-30 17:07:12.681: E/MessageQueue-JNI(13350): at dalvik.system.NativeStart.main(Native Method) 10-30 17:07:12.681: D/AndroidRuntime(13350): Shutting down VM 10-30 17:07:12.681: W/dalvikvm(13350): threadid=1: thread exiting with uncaught exception (group=0x414e4700) 10-30 17:07:12.691: E/AndroidRuntime(13350): FATAL EXCEPTION: main 10-30 17:07:12.691: E/AndroidRuntime(13350): java.lang.NoClassDefFoundError: ketai.ui.KetaiGesture 10-30 17:07:12.691: E/AndroidRuntime(13350): at com.rj.yayprocpd.YayProcessingPD.surfaceTouchEvent(YayProcessingPD.java:265) 10-30 17:07:12.691: E/AndroidRuntime(13350): at processing.core.PApplet$SketchSurfaceViewGL.onTouchEvent(Unknown Source) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.View.dispatchTouchEvent(View.java:7384) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2211) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1912) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2211) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1912) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2211) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1912) 10-30 17:07:12.691: E/AndroidRuntime(13350): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1975) 10-30 17:07:12.691: E/AndroidRuntime(13350): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1418) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.app.Activity.dispatchTouchEvent(Activity.java:2435) 10-30 17:07:12.691: E/AndroidRuntime(13350): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1922) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.View.dispatchPointerEvent(View.java:7564) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3883) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3778) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3483) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3406) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3540) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3429) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3398) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3406) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3379) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5419) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5399) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5370) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5493) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:182) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.os.MessageQueue.nativePollOnce(Native Method) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.os.MessageQueue.next(MessageQueue.java:132) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.os.Looper.loop(Looper.java:124) 10-30 17:07:12.691: E/AndroidRuntime(13350): at android.app.ActivityThread.main(ActivityThread.java:5303) 10-30 17:07:12.691: E/AndroidRuntime(13350): at java.lang.reflect.Method.invokeNative(Native Method) 10-30 17:07:12.691: E/AndroidRuntime(13350): at java.lang.reflect.Method.invoke(Method.java:525) 10-30 17:07:12.691: E/AndroidRuntime(13350): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 10-30 17:07:12.691: E/AndroidRuntime(13350): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 10-30 17:07:12.691: E/AndroidRuntime(13350): at dalvik.system.NativeStart.main(Native Method)
It happens when i touch the screen, causing crash of the app.
Thanks to all
Answers
OK I skiped the declaration of the ketai object
gesture = new KetaiGesture(this);
But now I can't run app anymore, it give me some errors:
Some ideas? Thanks
OK after some tests it works :)
I had to include Ketai library when exporting. It's pretty logical that it need to export library with the project, so the procedure is:
Hope that it can help someone with the same problems