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
Execution failed for task ':app:kaptDebugKotlin'. while using dagger 2.40, 2.40.1 but works with 2.38.1 #3032
Comments
Can you please try compiling using the Something like this: |
Kotlin 1.5.31 |
Thanks for providing the full trace, this is a duplicate issue of #2997, note that even though that issue mentions Hilt, it is a bug in Dagger too, we'll get a fix soon. |
This CL fixes an issue where the parameter name for a ComponentRequirement causes a cache-miss for that requirement. This occurs because one ComponentRequirement uses the name from JavacMethodParameter.getName() which pulls the original parameter name from the KotlinMetadata, and the other uses VariableElement.getSimpleName() which may match the original parameter in some cases but may be "arg0" if the name comes from a precompiled class. This difference in name causes the cache miss. I'll need to look into if this is something we should fix on the XProcessing side, e.g. have the user explicitly choose if they want to use the name from the kotlin metadata. Fixes #2997 Fixes #3032 RELNOTES=N/A PiperOrigin-RevId: 411454511
This CL fixes an issue where the parameter name for a ComponentRequirement causes a cache-miss for that requirement. This occurs because one ComponentRequirement uses the name from JavacMethodParameter.getName() which pulls the original parameter name from the KotlinMetadata, and the other uses VariableElement.getSimpleName() which may match the original parameter in some cases but may be "arg0" if the name comes from a precompiled class. This difference in name causes the cache miss. I'll need to look into if this is something we should fix on the XProcessing side, e.g. have the user explicitly choose if they want to use the name from the kotlin metadata. Fixes #2997 Fixes #3032 RELNOTES=N/A PiperOrigin-RevId: 411454511
This CL fixes an issue where the parameter name for a ComponentRequirement causes a cache-miss for that requirement. This occurs because one ComponentRequirement uses the name from JavacMethodParameter.getName() which pulls the original parameter name from the KotlinMetadata, and the other uses VariableElement.getSimpleName() which may match the original parameter in some cases but may be "arg0" if the name comes from a precompiled class. This difference in name causes the cache miss. I'll need to look into if this is something we should fix on the XProcessing side, e.g. have the user explicitly choose if they want to use the name from the kotlin metadata. Fixes #2997 Fixes #3032 RELNOTES=N/A PiperOrigin-RevId: 411454511
This CL fixes an issue where the parameter name for a ComponentRequirement causes a cache-miss for that requirement. This occurs because one ComponentRequirement uses the name from JavacMethodParameter.getName() which pulls the original parameter name from the KotlinMetadata, and the other uses VariableElement.getSimpleName() which may match the original parameter in some cases but may be "arg0" if the name comes from a precompiled class. This difference in name causes the cache miss. I'll need to look into if this is something we should fix on the XProcessing side, e.g. have the user explicitly choose if they want to use the name from the kotlin metadata. Fixes #2997 Fixes #3032 RELNOTES=N/A PiperOrigin-RevId: 411640088
- Updated Dagger version due to bug[google/dagger#3032]
I was setting up my project for learning Dagger2 version 2.46.1 I encountered the same error:
After lots of researching and trying out different solutions, I ended up trying this solution: ...
kapt {
generateStubs = true
} adding in
I'm not sure whether it may work for other kapt problems |
Getting following error
FAILURE: Build failed with an exception.
Execution failed for task ':app:kaptDebugKotlin'.
I was trying to upgrade the dagger from version 2.29.1 to 2.40.1 and I got the above error.
Got the same error when trying to use dagger version 2.40
However, I was successfully able to compile and run my project when using 2.38.1 , 2.39 and 2.39.1
So it appears that some change introduced in 2.40 is causing this issue.
The only change, entire testing was changing the dagger version in my project.
The text was updated successfully, but these errors were encountered: