-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
correctErrorTypes causes DataBindingComponent compile errors #2603
Comments
Thanks for the sample app @dmapr! TL;DR:Using In particular, Hilt does not allow extending the interface when using DetailsWhen you use
When using
Thus, in Dagger's processing we won't see the super type at all (it may be present in the Kotlin (There's also a separate issue here that when you do use |
@bcorso thanks for the detailed explanation! The confusing (at least to me) part was that by the time I get the error (with So I guess now for the real question — what's the best way to handle |
Rather than having the
(Note: technically, you shouldn't need the Then, to set the data binding component you can use
Or if you really want you can just cast:
|
Also, it might help to clarify why we didn't just allow extending an The reason is that |
Thanks @bcorso! My understanding is that we need the overrides because of #665. However I have noticed that after updating to the latest (Android Studio/AGP 4.2, Dagger 2.35.1) even declaring the custom binding component in Java no longer helps. I didn't have time to try and pinpoint whether it was AS/AGP or the latest Dagger that broke it, although I suspect the former as it went from Java 8 to Java 11. |
@bcorso I tried removing the individual method overrides from the
|
Thanks! The override issue does indeed look like #665. So just to wrap things up, the main takeaways are:
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. |
@bcorso — yep, I think all the questions were answered. Closing. Thanks again! |
Related issue: [2603](google/dagger#2603)
Not 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 #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
The text was updated successfully, but these errors were encountered: