Savedstateviewmodelfactory is finall, cannot inherit
问题 class SettingsViewModelFactory(application: Application, owner: SavedStateRegistryOwner) : SavedStateViewModelFactory(application, owner){ override fun <T : ViewModel?> create(modelClass: Class<T>): T { if (modelClass.isAssignableFrom(SettingsViewModel::class.java)){ return SettingsViewModel() as T } throw IllegalArgumentException("Invalid ViewModel class") } } I get a red underline below SavedStateViewModelFactory saying that the type is final and cannot be inherited from. What do I do? The