Cannot create instance of viewmodel after using Hilt in Android
问题 Here is my AllFilesListViewModel class. class AllFilesListViewModel @ViewModelInject constructor( private val pdfItemRepository: PdfItemRepository):ViewModel() { } Here is PdfItemRepository class. @Singleton class PdfItemRepository @Inject constructor(private val pdfItemDao: PdfItemDao){ } For pdfItemDao . I created a module named DatabaseModule . Below is the code - @Module @InstallIn(ApplicationComponent::class) object DatabaseModule { @Provides fun provideDatabase(@ApplicationContext