2 say yoo say_yoo 于 2014.11.08 21:29 提问

在实现手指滑动速度的获取时报错,希望各位大大加以指点~

logcat提取如下。。本人新手,真心不知道错在何处

11-08 21:15:57.550: E/InputEventReceiver(19380): Exception dispatching input event.
11-08 21:15:57.550: E/MessageQueue-JNI(19380): Exception in MessageQueue callback: handleReceiveCallback
11-08 21:15:57.565: E/MessageQueue-JNI(19380): java.lang.RuntimeException: MotionEvent { action=ACTION_DOWN, id[0]=0, x[0]=388.0, y[0]=1078.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=68296711, downTime=68296711, deviceId=2, source=0x1002 } recycled twice!
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.InputEvent.recycle(InputEvent.java:120)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.MotionEvent.recycle(MotionEvent.java:1647)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.InputEvent.recycleIfNeededAfterDispatch(InputEvent.java:138)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.InputEventReceiver.finishInputEvent(InputEventReceiver.java:156)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl.finishInputEvent(ViewRootImpl.java:5848)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl.access$1100(ViewRootImpl.java:104)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3676)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$SyntheticInputStage.onDeliverToNext(ViewRootImpl.java:4271)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3643)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3620)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3674)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3643)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.finish(ViewRootImpl.java:3636)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3653)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3624)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3674)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3643)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3750)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3651)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3807)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3624)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3674)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3643)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3651)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3624)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5836)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5816)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5787)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5925)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.os.MessageQueue.nativePollOnce(Native Method)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.os.MessageQueue.next(MessageQueue.java:138)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.os.Looper.loop(Looper.java:123)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at android.app.ActivityThread.main(ActivityThread.java:5314)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at java.lang.reflect.Method.invokeNative(Native Method)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at java.lang.reflect.Method.invoke(Method.java:515)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:678)
11-08 21:15:57.565: E/MessageQueue-JNI(19380): at dalvik.system.NativeStart.main(Native Method)

1个回答

tongnuxie
tongnuxie   2015.05.29 11:03

去掉event.recycle();就对了

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!