HiltWorker cannot inject dependency

231 views Asked by At

I want to use Coroutine worker with with hilt dependency injection.

Worker is running if constructor has only two parameters. context and workerParams;

When I add another dependency it is throwing an exception.

enter image description here

Below my code:

Manifest: enter image description here

App:

enter image description here

Worker:

enter image description here

1

There are 1 answers

0
Xudoyshukur Jo'rayev On

After a bit research, I find an answer. I should add the dependency

enter image description here

After adding that dependency. The worker is running fine