ViewModelInstantiationException
class ViewModelInstantiationException(viewModelClass: Class<*>, throwable: Throwable) : RuntimeException
Content copied to clipboard
Thrown when an application tries to create an instance of ViewModel class, but the specified class object cannot be instantiated. The instantiation can fail for a variety of reasons including but not limited to:
The class does not have the required constructor.
The class is not visible from current scope.
Parameters
viewModelClass
The reference of the view model class that failed to instantiate.
throwable
The original exception.
Constructors
Link copied to clipboard
fun ViewModelInstantiationException(viewModelClass: Class<*>, throwable: Throwable)
Content copied to clipboard