I had the same problem with hilt and workers, and I was missing to add the dependency for hilt androidx-hilt-compiler = { module = "androidx.hilt:hilt-compiler", version.ref = "hiltCompiler" }
then you don't need to create your custom workerFactory