ComponentProcessingStep was unable to process 'Component' with Kotlin 1.7.0
See original GitHub issueSimilar to this but I dont use Hilt. Downgrading to Kotlin 1.6.21 works. I also use compose (compiler 1.2.0 for Kotlin 1.7.0, otherwise 1.2.0-rc02).
ComponentProcessingStep was unable to process 'progression.phone.main.PhoneComponent' because 'progression.presentation.training.replace.ReplaceTrainingController' could not be resolved.
If type 'progression.presentation.training.replace.ReplaceTrainingController' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'progression.presentation.training.replace.ReplaceTrainingController' is on your classpath.
The file is included in my classpath and is injected as follows:
class ReplaceTrainingController @Inject constructor(...)
class OtherController @Inject constructor(
private val replaceTrainingController
)
kotlin = ‘1.7.0’ compose-compiler = ‘1.2.0’ gradle = ‘7.4.0-alpha07’ dagger = ‘2.42’
Issue Analytics
- State:
- Created a year ago
- Reactions:5
- Comments:26 (1 by maintainers)
Top GitHub Comments
As a follow-up to the above, I was able to recreate it in a very controlled project. I suspected still that the problem was with kapt and not Dagger, so I also tried it with a small / custom annotation processor.
I can confirm that Dagger isn’t the problem in my case - and instead with the fact that generated classes aren’t appearing on the kapt classpath in Kotlin 1.7
Here’s a reproduction of it: https://github.com/malbanese/kotlin-1-7-kapt-bug
We see a similar issue when updating to Kotlin 1.7.0I think it’s worth to mention that the classes which can’t be found are within a pure Kotlin module (no android module)I tested it and migrated the module to an android module and it has the same effect.