question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ComponentProcessingStep was unable to process 'Component' with Kotlin 1.7.0

See original GitHub issue

Similar 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:open
  • Created a year ago
  • Reactions:5
  • Comments:26 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
malbanesecommented, Jul 15, 2022

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

3reactions
jannisveerkampcommented, Sep 12, 2022

We see a similar issue when updating to Kotlin 1.7.0

I 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Dagger2 ComponentProcessor was unable to process
It's very strange as I didn't change any dependencies in comparison with main branch. The only thing changed - new link from root...
Read more >
What's new in Kotlin 1.7.0
Kotlin 1.7.0 has been released. It unveils the Alpha version of the new Kotlin/JVM K2 compiler, stabilizes language features, ...
Read more >
Lint crashing in Kotlin 1.7.0-RC2 build [234865137]
A failure occurred while executing com.android.build.gradle.internal.lint.AndroidLintWorkAction > Internal error: unexpected lint return value -1 ...
Read more >
Migrating to Hilt - Dagger
Inject methods for other Android types should also eventually be removed as those are later migrated to use @AndroidEntryPoint . Java. Kotlin. @Component...
Read more >
Dagger Hilt in Android with Example - GeeksforGeeks
Dagger Hilt simplifies the whole process and reduces the unnecessary steps without ... plugins { id 'kotlin-android' id 'kotlin-kapt' id ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found