title: Type mismatch: inferred type is String! but Unit was expected
body: <p>I'm have the error &quot;Type mismatch: inferred type is String! but Unit was expected&quot;, but if I try to use quick fix I do an infinite loop with that error and &quot;Return type of 'run' is not a subtype of the return type of the overridden member [...]&quot; while using this code in theses files:</p>
  <p>ClockViewModel.kt:</p>
  <pre><code>package com.everyapp.clock20.ui.clock
  
  import android.annotation.SuppressLint
  import androidx.lifecycle.LiveData
  import androidx.lifecycle.MutableLiveData
  import androidx.lifecycle.ViewModel
  import java.text.SimpleDateFormat
  import java.util.*
  
  
  class ClockViewModel : ViewModel() {
  
      private fun timing() {
          Timer().schedule(object : TimerTask() {
              @SuppressLint(&quot;SimpleDateFormat&quot;)
              override fun run() {
                  val simpleDateFormat = SimpleDateFormat(&quot;HH:mm:ss&quot;)
                  return simpleDateFormat.format(Date())
  
              }
          },0, 100)
      }
  
      private val _text = MutableLiveData&lt;String&gt;().apply {
          value = timing().toString()
      }
      val text: LiveData&lt;String&gt; = _text
  }
  </code></pre>
  <p>ClockFragment.kt:</p>
  <pre><code>package com.everyapp.clock20.ui.clock
  
  import android.os.Bundle
  import android.view.LayoutInflater
  import android.view.View
  import android.view.ViewGroup
  import android.widget.TextView
  import androidx.fragment.app.Fragment
  import androidx.lifecycle.ViewModelProvider
  import com.everyapp.clock20.databinding.FragmentClockBinding
  
  class ClockFragment : Fragment() {
  
      private var _binding: FragmentClockBinding? = null
  
      // This property is only valid between onCreateView and
      // onDestroyView.
      private val binding get() = _binding!!
  
      override fun onCreateView(
          inflater: LayoutInflater,
          container: ViewGroup?,
          savedInstanceState: Bundle?
      ): View {
          val clockViewModel =
              ViewModelProvider(this).get(ClockViewModel::class.java)
  
          _binding = FragmentClockBinding.inflate(inflater, container, false)
          val root: View = binding.root
  
          val textView: TextView = binding.textClock
          clockViewModel.text.observe(viewLifecycleOwner) {
              textView.text = it
          }
          return root
      }
  
      override fun onDestroyView() {
          super.onDestroyView()
          _binding = null
      }
  }
  </code></pre>
  <p>I was expecting to show text and updating it every second.</p>