correctErrorTypes causes DataBindingComponent compile errors
See original GitHub issueNot sure whether this is Hilt, Kapt or both, but I was migrating a project from Dagger Android to Hilt and followed the guide by @nuhkoca in https://github.com/google/dagger/issues/2030. However my project refused to compile the generated custom data binding component implementation. I found that a Github repo was created based on @nuhkoca’s gist and was able to narrow it down to this option. I’ve forked the project to demonstrate the problem to https://github.com/dmapr/HiltDataBindingSample, look in app/build.gradle
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
correctErrorTypes causes DataBindingComponent compile errors
correctErrorTypes causes DataBindingComponent compile errors. ... However my project refused to compile the generated custom data binding component ...
Read more >ERROR : error.NonExistentClass Kotlin In multi module ...
I'm using Android Studio 2.3.3. When compiling the Android Project, I encountered this error: error: error.NonExistentClass. The error appears ...
Read more >Android – ERROR : error.NonExistentClass Kotlin In multi module ...
When compiling the Android Project, I encountered this error: ... is performed and caused by the dagger class cannot found, the class is...
Read more >Kapt3 fails build (error: unexpected type) when correctErrorTypes ...
Upgraded my app from 1.2.70 to 1.3.0 and my build started failing with a kapt error. Turning off correctErrorTypes fixes the issue.
Read more >Using kapt | Kotlin
If the annotation processors used in the build cannot be properly cached, ... kapt { javacOptions { // Increase the max count of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! The override issue does indeed look like #665. So just to wrap things up, the main takeaways are:
correctErrorTypes = true
DataBindingComponent
instead of extending the@DefineComponent
type directly (Example: https://github.com/google/dagger/issues/2603#issuecomment-840740622).override
the methods inDataBindingComponent
, but this is covered by #665.If that all sounds correct, then I think we can close this issue now since there’s nothing for us to do outside of #665.
Rather than having the
@DefineComponent
extendDataBindingComponent
you can have your entry point extend it, which is effectively the same thing.(Note: technically, you shouldn’t need the
override
since Dagger should see the method defined inDataBindingComponent
. However, it’s likely related withDataBindingComponent
not being generated yet. I’ll have to look further to see if there’s anything we can do about it on our side).Then, to set the data binding component you can use
EntryPoints
:Or if you really want you can just cast: