Caused by: java.lang.InstantiationException: java.lang.Class<.ui.splash.SplashViewModel> has no zero argument constructor
Lans opened this issue · comments
Lans commented
@HiltViewModel
open class SplashViewModel @Inject constructor(private val splashRepository: SplashRepository) : BaseViewModel()
class SplashRepository @Inject constructor() : BaseRepository()
override val mViewModel: SplashViewModel by viewModels()
通过by viewModels() splashRepository这个注解不上去