Dagger
目前我还没有任何问题,因为我没有在我的项目中添加 Realm
,在我的项目中添加之后我希望我可以成功构建我的项目,但我现在收到此错误:
Can not resolve symbol DaggerApplicationComponent
我想在我的应用程序中需要 Realm
并且我无法删除它,但是我在 Logcat
上没有收到任何其他错误以了解问题所在,我应该解决这个问题,我不确定如何解决这个问题
当我在 build.gradle 中有这行时我没有问题
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'
但是在添加 Realm
之后我得到了
Configuration with name 'kapt' not found
错误,在将 kotlin-kapt
添加到此文件后,我得到了
Can not resolve symbol DaggerApplicationComponent
错误,例如:
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'
最佳答案
问题已解决,将 annotationProcessor
更改为 kapt
关于android - 添加 kotlin-kapt 导致 Can not resolve symbol DaggerApplicationComponent 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54769574/