-
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
NullPointerException dagger.spi.shaded.androidx.room.compiler.processing.XTypeElement.getAnnotation #4241
Comments
@gianpaolof there should be more to the stacktrace which would tell us where this is coming from. Can you post the entire stacktrace? |
hi @bcorso |
Looks like you are missing a Dagger producers class. Can you try adding |
hello @bcorso it works, thank you! |
No, something weird is going on. The failure is happening in
The dependency should be small and shouldn't be harmful to keep. However, if there's anyway you could share a project that reproduces the behavior we could take a look and help figure out what's going on in your case. |
thanks @bcorso |
I get a similar issue when using:
Adding dagger-producers does NOT fix the issue, but the stacktrace seems to becoming from a hilt processor. Also I noticed that the issue is only compiling my release bundle, I don't receive the issue compiling by debug bundle. Stacktrace
|
Something odd is going on since at the point that this is crashing, we should have already read that annotation in another place verifying it exists before getting here. So something weird is going on for it to be missing at this point. Especially odd is that this only happens on your release build. Unfortunately, I think this may be difficult for us to get to the bottom of without a repro. |
@Chang-Eric The master branch of my repo will not be committed to until the issue is fixed so, unless you're looking for a much simpler example, feel free to check it out for in order to reproduce the issue. |
I didn't get a lot of time to look deeply at this, but I feel like the fact that you have In general, you shouldn't need to have keep rules for anything in |
@Chang-Eric your were correct. Removing the The reason I added this in the first place is because I got a Dagger, Thanks once again again for taking the time to have a look at the issue, your insight helped me a lot! |
What happened? What did you expect to happen?
I've been trying to add Hilt in my Android app but I run into this issue when building:
Execution failed for task ':app:hiltJavaCompilePreprod'.
I am using jetbrains runtime 17.
Part of my root gradle:
part of my app gradle:
Is this a bug or there is something wrong with my configuration?
EDIT
stack trace:
A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
The text was updated successfully, but these errors were encountered: