Android WorkManager Worker can not be injected using Dagger Hilt `@WorkerInject`

Update (March 24, 2021):

Since* version 2.6.0-alpha01, WorkManager uses androidx.startup to initialize WorkManager.
For the new required changes to AndroidManifest.xml, check this answer.

Original Answer:

As per the WorkManager Configuration and Initialization documentation, to use the Configuration.Provider interface on your Application, you must remove the default initializer:

<!-- In your AndroidManifest.xml -->
    tools:node="remove" />

Otherwise, the default initializer will still run, wiping out your custom intialization and its HiltWorkerFactory.