Hi Mor, do you have your gestures file in res/raw directory? Do you have the necessary preparations done in your onCreate method? They are the same as in the example provided by Google, ie "GestureLibraries.fromRawResource", "GestureOverlayView gestures = findViewById" and "addOnGesturePerformedListener"? That should be enough, works fine for me in the example.
Best regards, Filip Havlicek 2010/9/3 marmor <gaz...@gmail.com> > I got a crash with the following stack trace: > > E/AndroidRuntime( 6709): Uncaught handler: thread main exiting due to > uncaught exception > E/AndroidRuntime( 6709): java.lang.IllegalArgumentException: > Comparison method violates its general contract! > E/AndroidRuntime( 6709): at java.util.TimSort.mergeHi(TimSort.java: > 864) > E/AndroidRuntime( 6709): at java.util.TimSort.mergeAt(TimSort.java: > 481) > E/AndroidRuntime( 6709): at > java.util.TimSort.mergeCollapse(TimSort.java:406) > E/AndroidRuntime( 6709): at java.util.TimSort.sort(TimSort.java:210) > E/AndroidRuntime( 6709): at java.util.TimSort.sort(TimSort.java:169) > E/AndroidRuntime( 6709): at java.util.Arrays.sort(Arrays.java:2500) > E/AndroidRuntime( 6709): at > java.util.Collections.sort(Collections.java:1952) > E/AndroidRuntime( 6709): at > android.gesture.InstanceLearner.classify(InstanceLearner.java:84) > E/AndroidRuntime( 6709): at > android.gesture.GestureStore.recognize(GestureStore.java:134) > E/AndroidRuntime( 6709): at > android.gesture.GestureLibrary.recognize(GestureLibrary.java:64) > E/AndroidRuntime( 6709): at > > com.contapps.android.search.SearchResults.onGesturePerformed(SearchResults.java: > 130) > > Line 130 in my code is: > ArrayList<Prediction> predictions = mLibrary.recognize(gesture); > and it is the first line in onGesturePerformed(GestureOverlayView > overlay, Gesture gesture). > > Any idea what's wrong and what checks can I perform on gesture before > sending it to recognize to avoid this crash? > > Thanks, > Mor > @ Contapps. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en