Recently, the development encountered a pit, record it
I use timed tasks in Android, in order to detect whether the timed tasks are running normally, so I write like this
TimerTask is not used here, because I found that the Handler object already exists in the current class, so I used Handler directly. Of course, the effect is the same. Then, I first had a magical problem, which appeared for the first time in the log "- --------------------", I found that the next log was not printed after waiting for a long time, and then I changed the TimerTask to test, and the result was the same , after 2 consecutive days of continuous testing and analysis, it was finally found that the cause of the problem was caused by the cache of Logcat. The solution is
Append time to fix log cache issue