Category "dagger-hilt"

Expected @AndroidEntryPoint to have a value. Did you forget to apply the Gradle Plugin?

When I am using Hilt in android with Room I got this kinda error. The full log is here: home/someone/Desktop/Calculator/app/build/tmp/kapt3/stubs/debug/com/hami

@HiltViewModel annotated class should contain exactly one @Inject annotated constructor

I keep getting this error: public final class MainViewModel extends androidx.lifecycle.ViewModel { ^ @HiltViewModel annotated class should contain exactly one

Hilt: java.lang.ClassNotFoundException: Didn't find class "com.kotlin20test.Hilt_MyApp"

I have an error concerning Hilt, I"ve been trying to inject a retrofit interface I created using Hilt, Here is the error: java.lang.ClassNotFoundException: Di

Dagger hilt predefined components for non android scopes

I have the following module that is used in the data layer of my application which is a plain Android Library. @Module interface MapperModule { @Binds f

How to do Assisted Injection with Navigation Compose?

I've a composable called ParentScreen and a ViewModel named ParentViewModel. Inside the ParentViewModel, I am collecting a value from my repo. class MyRepo @Inj

Inject context with Hilt: this field leaks a context object

I'm using Hilt to inject context and other dependencies into my HomeViewModel class; Everything is working properly but I'm getting this warning. How can I prev

Inject context with Hilt: this field leaks a context object

I'm using Hilt to inject context and other dependencies into my HomeViewModel class; Everything is working properly but I'm getting this warning. How can I prev

HiltViewModel: Cannot create an instance of class

I am using Hilt. After updating to 1.0.0-alpha03 I got warnings that @ViewModelInject is deprecated and I should use @HiltViewModel. But when I change it I got

Hilt Inject field into any class with no scope

Suppose that I have a class A class A () I want to inject an instance of A as a field into class B and let Hilt or Dagger to handle it. Class B { @Inject la

Plugin [id: 'dagger.hilt.android.plugin'] was not found in any of the following sources

I get the following warning when I want to use @AndroidEntryPoint which is a property of hilt in my project. Expected @AndroidEntryPoint to have a value. Did y

What is the proper way to navigate from ViewModel in Jetpack Compose + Hilt + ViewModel?

I have stumbled upon this quite trivial, but tricky problem. I have spent a decent amount of time searching official docs, but unfortunately found no answer. Of

Dagger-Hilt @AndroidEntryPoint is not working with BottomSheetDialogFragment()

I am using ViewModel inside BottomSheetDialogFragmet() so I have to mark my BottomSheet with @AndroidEntryPoint. @AndroidEntryPoint class SearchAddressDialog :

Store data and "Cannot create an instance of class ViewModel" - Hilt - Room - JetpackCompose

I try to store some days from ScheduleScreen screen. Lib uses in theme topic. While I was doing this, I had two questions: why i got this error Cannot create an

Is ApplicationComponent deprecated?

I just started using Dagger Hilt for dependency injection on Android and I get a warning on Android Studio saying 'ApplicationComponent' is deprecated. Deprecat

Is ApplicationComponent deprecated?

I just started using Dagger Hilt for dependency injection on Android and I get a warning on Android Studio saying 'ApplicationComponent' is deprecated. Deprecat

Cannot create instance of viewmodel after using Hilt in Android

Here is my AllFilesListViewModel class. class AllFilesListViewModel @ViewModelInject constructor( private val pdfItemRepository: PdfItemRepository):ViewMod

Cannot create instance of viewmodel after using Hilt in Android

Here is my AllFilesListViewModel class. class AllFilesListViewModel @ViewModelInject constructor( private val pdfItemRepository: PdfItemRepository):ViewMod

Jetpack Compose + Hilt: java.lang.RuntimeException: Cannot create an instance of class ViewModel

I started trying jetpack Compose recently and used hilt & hilt-navigation-compose for my app. It works fine with the first ViewModel. However, when I try th

Modules that need to be instantiated by Hilt must have a visible, empty constructor

@Module @InstallIn(SingletonComponent::class) class WheelModule constructor(val size:Int) { @Provides fun provideWheel():Wheel = Wheel(size) } Module