2

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 Answer 1

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.