Answers for "java.lang.runtimeexception cannot create an instance of class viewmodel kotlin"

2

java.lang.RuntimeException: Cannot create an instance of class ViewModel

if you are using Hilt, ensure your "activity/fragment" 
is having" @AndroidEntryPoint " annotation
Posted by: Guest on October-20-2021
0

cannot create an instance of class viewmodel kotlin

// add this piece of code in onCreate method
viewmodel = ViewModelProviders.of(this).get(SettingsViewModel::class.java)
Posted by: Guest on July-20-2021

Code answers related to "java.lang.runtimeexception cannot create an instance of class viewmodel kotlin"

Browse Popular Code Answers by Language