I want to update a textview in a fragment every 1 second.It is crashing after 1 second. Any help. " android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views."
doAsync {
timer.scheduleAtFixedRate(1000, 1000)
{ timing_of_task.text = (Date() - task!!.tasktimer!!.startTime).formatted() }
}