利用handler发送消息报:"This message is already in use"解决办法
2011-07-01 11:10
876 查看
每天频繁的遇到问题,解决问题,成长不断。所以当我们遇到一个新问题要感到荣幸,心想:“我是第一个遇到这个问题的人,我也要成为第一个决绝这个问题的人。这样人后面都学习你的处理方法,然后把你的名字记入问题史册,多牛X,不是吗?...哈哈~自豪~!”积极、坦然的面对你遇到的每一个问题,这会让你受益多多,进步多多。加油~~~
在利用handler发送消息时,遇到了一个问题如下:
07-01 10:32:15.233: ERROR/AndroidRuntime(9774): android.util.AndroidRuntimeException: { what=1006 when=-2ms arg1=1 obj=MotionEvent{40551f40 action=0 x=180.85541 y=390.24445 pressure=0.1137255 size=0.06666667} } This message is already in use.
老是报这个错,问题就很明显了。说明发送的消息正在消息队列中,表示现在正在被使用。解决办法重新创建一个新的消息,发送过去就ok啦!问题解决。
当我有在思考一个问题,我不想创建新的对象想重新利用这个对象,所以就想到如何你很明确的知道这个消息在那里使用完了,就出消息队列中移除,【注意:由于cpu运行速度非凡人所能想想的,所以在移除的时候得判断系统时候知道消息处理后自动移除消息队列了,其实就是得判断这个消息是否还在消息队列中】 在这里遇到了问题,我不知道如何判断某消息是否还在消息队列中,请求高人指点?在此感谢了~~
在利用handler发送消息时,遇到了一个问题如下:
07-01 10:32:15.233: ERROR/AndroidRuntime(9774): android.util.AndroidRuntimeException: { what=1006 when=-2ms arg1=1 obj=MotionEvent{40551f40 action=0 x=180.85541 y=390.24445 pressure=0.1137255 size=0.06666667} } This message is already in use.
老是报这个错,问题就很明显了。说明发送的消息正在消息队列中,表示现在正在被使用。解决办法重新创建一个新的消息,发送过去就ok啦!问题解决。
当我有在思考一个问题,我不想创建新的对象想重新利用这个对象,所以就想到如何你很明确的知道这个消息在那里使用完了,就出消息队列中移除,【注意:由于cpu运行速度非凡人所能想想的,所以在移除的时候得判断系统时候知道消息处理后自动移除消息队列了,其实就是得判断这个消息是否还在消息队列中】 在这里遇到了问题,我不知道如何判断某消息是否还在消息队列中,请求高人指点?在此感谢了~~
相关文章推荐
- Android基础-- 利用handler发送消息报:"This message is already in use"解决办法
- Android 利用handler发送消息:"This message is already in use"错误
- 解决Handler发送消息时:this message is already in use
- 解决Handler发送消息时:this message is already in use
- 解决Handler发送消息时:this message is already in use
- Android 子线程发送handle更新UI遇到This message is already in use解决方法
- message from server: "Host is not allowed to connect to this MySQL server"解决办法
- 远程登录mysql,报错:message from server: "Host is not allowed to connect to this MySQL server"解决办法
- gvim中Mapping already in use: "<LocalLeader>is", mode "n"错误解决
- 解决eclipse中运行web项目时弹出的"Port 8080 required by Tomcat v7.0 Server at localhost is already in use... "
- This message is already in use错误及解决
- message from server: "Host is not allowed to connect to this MySQL server"解决办法
- One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot"
- uploadify"ID SWFUpload_0 is already in use..."错误的解决方法
- gvim中Mapping already in use: "<LocalLeader>is", mode "n"错误解决
- mysql数据库 message from server: "Host is not allowed to connect to this MySQL server"解决办法
- virt-install Guest name 'test' is already in use解决办法
- "This property is obsolete now. Use the TextPattern property instead."的警告解决办法
- android 细节之 AndroidRuntimeException:This message is already in use
- 解决"There is already an open DataReader associated with this Command which must be closed first." exception in EF 中