adding kotlin-kapt cause of getting Can not resolve symbol DaggerApplicationComponent error

假如想象 提交于 2019-12-24 10:24:10

问题


I did not already have any problem with Dagger as far i don't add Realm in my project, after adding that on my project i expect i can build successful my project but i get this error now:

Can not resolve symbol DaggerApplicationComponent

i want to need Realm on my application and i can't remove that, but i dont get any other error on Logcat to know whats problem and i should be fix that and I'm not sure how can i resolve this problem

when i have this lines in build.gradle i dont have problem

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.jakewharton.hugo'
apply plugin: 'com.novoda.bintray-release'

but after adding Realm i get

Configuration with name 'kapt' not found

error, and after adding kotlin-kapt to this file i get

Can not resolve symbol DaggerApplicationComponent

error, for example:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.jakewharton.hugo'
apply plugin: 'com.novoda.bintray-release'
apply plugin: 'realm-android'

回答1:


Problem resolved, after change annotationProcessor to kapt



来源:https://stackoverflow.com/questions/54769574/adding-kotlin-kapt-cause-of-getting-can-not-resolve-symbol-daggerapplicationcomp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!