Problems are frequently encountered, solved, and constantly growing every day. Therefore, we were honored to have encountered a new problem and thought, "I am the first person to have encountered this problem. I also want to be the first person to reject this problem. In this way, people will learn how to deal with it, and then record your name in the question history book, multi-bull X, isn't it ?... Haha ~ Proud ~!" Actively and calmly face every problem you encounter. This will benefit you a lot and make more progress. Come on ~~~
When using handler to send messages, a problem occurs as follows:
10:32:15 07-01. 233: Error/androidruntime (9774): Android. util. androidruntimeexception: {What = 1006 when =-2 ms 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.
This error is always reported, and the problem becomes obvious. Indicates that the sent message is in the message queue and is in use. Solution: Create a new message and send it! Solve the problem.
When I was thinking about a problem, I didn't want to create a new object and want to reuse it again, so I thought about how you clearly knew that the message was used up there, remove from the output message queue ,【Note:: Because the CPU runs at a high speed, you can think about it. Therefore, when removing a message, you have to determine that the message queue is automatically removed after the message is processed by the system, in fact, it is necessary to determine whether the message is still in the message queue.] I have encountered a problem here. I don't know how to determine whether a message is still in the message queue. Ask the superior for advice? Thank you ~~