android - 为什么在使用AutoFactory时在Kotlin中得到NonExistentClass?

标签 android kotlin dagger-2 autofactory

我在Kotlin中使用AutoFactory,但收到了问题,当我使用java时没有任何问题。我收到此问题是什么问题?
TopicLoaderModule_Companion_ProvidePageLoaderViewFactory.java:29: error: cannot find symbol private final Provider<NonExistentClass> pageElementFactoryProvider;

    @Provided private val presenter: Presenter,
       private val model: Model
)


@Module
interface TopicLoaderModule{
companion object {

@JvmStatic
@Provides
fun provideXXX(pageElementFactory: TopicElementFactory){
}

}
}

最佳答案

我想发布我问题的答案。

kapt {
    correctErrorTypes = true
}

https://kotlinlang.org/docs/reference/kapt.html#non-existent-type-correction

关于android - 为什么在使用AutoFactory时在Kotlin中得到NonExistentClass?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61599403/

相关文章:

android - Gradle 更新后不再显示 dagger2 组件图

android - 如何从 html 链接启动 Android 服务?

android - 添加 (AdMob) 大小可以是 fill_parent insted wrap_content?

javascript - 从 Android WebViewClient 中的网站下载 Blob 文件

android - 元素共享的过渡有效,但是共享的多个元素不起作用[Android]

kotlin - 如何在通知之前暂停Kotlin协程

android - textwatcher 上的 IndexOutOfBoundsException

kotlin - Kotlin 协程中的挂起函数是什么意思?

android - 在 attachBaseContext 中使用 Dagger 注入(inject)对象

Android Mockito kotlin.UninitializedPropertyAccessException : lateinit property dataManager has not been initialized