Exception in MessageQueue callback: handleReceiveCallback

07-20 14:27:11.477: E/InputEventReceiver(7209): Exception dispatching input event.
07-20 14:27:11.477: E/MessageQueue-JNI(7209): Exception in MessageQueue callback: handleReceiveCallback
07-20 14:27:11.497: E/MessageQueue-JNI(7209): java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(2131362042, class com.edaixi.swipemenu.widget.SwipeMenuListView) with Adapter(class com.edaixi.swipemenu.widget.SwipeMenuListView$1)]
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.widget.ListView.layoutChildren(ListView.java:1544)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.widget.AbsListView.onTouchEvent(AbsListView.java:3410)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at com.edaixi.swipemenu.widget.SwipeMenuListView.onTouchEvent(SwipeMenuListView.java:194)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.View.dispatchTouchEvent(View.java:7257)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2171)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1906)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2177)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1920)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2177)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1920)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2177)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1920)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2177)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1920)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2002)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1454)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.app.Activity.dispatchTouchEvent(Activity.java:2418)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1950)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.View.dispatchPointerEvent(View.java:7437)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3331)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3241)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4403)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4382)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4474)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:179)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.os.MessageQueue.nativePollOnce(Native Method)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.os.MessageQueue.next(MessageQueue.java:125)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.os.Looper.loop(Looper.java:124)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at android.app.ActivityThread.main(ActivityThread.java:5106)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at java.lang.reflect.Method.invokeNative(Native Method)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at java.lang.reflect.Method.invoke(Method.java:511)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
07-20 14:27:11.497: E/MessageQueue-JNI(7209): 	at dalvik.system.NativeStart.main(Native Method)
07-20 14:27:11.497: W/dalvikvm(7209): threadid=1: thread exiting with uncaught exception (group=0x40c2d930)

  

 

或者另外异常:

 

 

Tag:MessageQueue-JNI
Exception dispatching input event.
Exception in MessageQueue callback: handleReceiveCallback
java.lang.NullPointerException
………………………………………………………………

  

多次触发触摸屏事件,导致对同一个事件处理的消息过多,当第一个消息已处理完事件并销毁事件时,由于该事件已销毁但还没来得及通知销毁第二个同样的消息,当主线程执行第二个消息时,由于获取不了该事件,所以抛出异常。
 
解决:用try..catch..包围TouchEvent事件处理。完美解决,java基础用法。
 
参考:http://blog.sina.com.cn/s/blog_6ddbf6920101m7dl.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值