dagger: error: compiler message file broken: key=compiler.err.Processor
Kotlin 2.61
A missing @Provides
annotation in Module on Dagger 2.17 results in error: compiler message file broken: key=compiler.err.Processor: org.jetbrains.kotlin.kapt3.base.ProcessorWrapper@550c0cf8 arguments={0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}
A missing @Provides
annotation in Module on Dagger 2.15 results in a meaningful exception describing which dependency could not be provided
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 19 (1 by maintainers)
I got the error because my base module had a dependency on
Room
but it was imported withimplementation
instead ofapi
So if you end up hitting this error, double check the libraries you’re trying to access and whether those are truly imported in the right modules or “re-exported” in submodules, depending on how you setup your gradle files.
What’s the status on this? I’ve been struggling for a long time getting an Instant App working and now most recently I got this error, and I’m writing it in Kotlin.
I have solved same problem by adding missed dependency to app module.
@ronshapiro I was able to reproduce the problem and have created a sample project https://github.com/giem/KaptDaggerBug
Basically the problem happens if you have a multi gradle project, and one of the gradles submodules imports something, but doesn’t expose it to the parent. (like RxJava in the example project). The kapt error occurs only if RxJava classes are used as the parameters of the methods, not when used as the return types.
Not sure if this is a dagger or kapt problem.