在 Kotlin 上使用 Dagger 的 @Module 注解后出错

Error after using @Module annotation of Dagger on Kotlin

在我的示例 kotlin 项目中使用匕首的 @Module 注释后,我一直收到此错误。

Execution failed for task ':app:kaptDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
java.lang.reflect.InvocationTargetException (no error message)

gradle 的 kaptDebugKotlin 任务在编译期间抛出错误。还有其他人遇到类似问题吗?

更新我一直使用的Dagger版本后,问题似乎消失了。感谢 this post (referring to google/dagger#2845 and google/dagger#2511),我能够摆脱错误。我一直在用2.28版本,更新到2.34后错误消失了