1.在使用Handler发消息的时候,在TimerTask的run方法中,每执行一次run方法,就发一次,遇到的错误为:The specified message queue synchronization barrier token has not been posted or has already been removed.
解决办法为:在UI线程的Handler的handleMessage方法中,更新UI之前加入this.obtainMessage();即可。
1.在使用Handler发消息的时候,在TimerTask的run方法中,每执行一次run方法,就发一次,遇到的错误为:The specified message queue synchronization barrier token has not been posted or has already been removed.
解决办法为:在UI线程的Handler的handleMessage方法中,更新UI之前加入this.obtainMessage();即可。