title: Caused by java.lang.IllegalArgumentException: SavedStateProvider with the given key is already registered
body: <p>Below is my code, I don't know why there is such a problem, I have pasted the code that may be relevant below.</p>
  <p>I don't know that registerSavedStateProvider will be affected by those places.</p>
  <p><strong>CrashLOG</strong></p>
  <pre><code>Caused by java.lang.IllegalArgumentException: SavedStateProvider with the given key is already registered
         at androidx.savedstate.SavedStateRegistry.registerSavedStateProvider(SavedStateRegistry.java:111)
         at androidx.lifecycle.SavedStateHandleController.attachToLifecycle(SavedStateHandleController.java:50)
         at androidx.lifecycle.SavedStateHandleController.create(SavedStateHandleController.java:70)
         at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:67)
         at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:84)
         at dagger.hilt.android.internal.lifecycle.HiltViewModelFactory.create(HiltViewModelFactory.java:109)
         at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:187)
         at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)
         at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:54)
         at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:41)
         at com.xx.getVm
  </code></pre>
  <p><strong>Activity</strong></p>
  <pre><code>override fun onCreate(savedInstanceState: Bundle?) {
  if (savedInstanceState == null) {
              val target = XXFragment()
              supportFragmentManager
                  .beginTransaction()
                  .add(R.id.container, target)
                  .commitAllowingStateLoss()
          }
  }
  
  
  override fun onSaveInstanceState(outState: Bundle) {
          outState.putParcelable(xx,xx)
          super.onSaveInstanceState(outState)
      }
  
      override fun onRestoreInstanceState(savedInstanceState: Bundle) {
          super.onRestoreInstanceState(savedInstanceState)
          xx = xx
      }
  
  </code></pre>
  <p><strong>Fragment</strong></p>
  <pre><code>private val vm: XXViewModel by viewModels()
  </code></pre>