https://kotlinlang.org logo
Title
u

user

07/19/2022, 7:41 AM
Problem with ViewModelFactory in Android Studio I am trying to create a ViewModel Factory with the below code: class TestViewModelFactory(private val testId: UUID) : ViewModelProvider.Factory { override fun create(modelClass: Class): T { return TestViewModel(testId) as T } } However, against the class definition, there is a compilation error saying: Inheritance from an interface with '@JvmDefault' members is only allowed with -Xjvm-default option Can someone help me with what this problem is about?