3

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'
EpicPandaForce
  • 79,669
  • 27
  • 256
  • 428
DolDurma
  • 15,753
  • 51
  • 198
  • 377
  • 1
    I assume you have some build error which makes the annotation processing fail. Have you tried checking the build tab / compiler output? – EpicPandaForce Feb 19 '19 at 15:37
  • @EpicPandaForce is this what you want to know that: http://paste.debian.net/1068972/ ? – DolDurma Feb 19 '19 at 16:53
  • Unfortunately this is just the other side of it aka gradle's error message (see the exception message saying you should check the compiler output for details :P `Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details.`) so you should check https://stackoverflow.com/questions/16633956/android-studio-where-is-the-compiler-error-output-window/48005426#48005426 – EpicPandaForce Feb 19 '19 at 16:58
  • @EpicPandaForce I'm so sorry, http://paste.debian.net/1068977/ and full debug link https://paste.ubuntu.com/p/7m2B5VFsF8/ – DolDurma Feb 19 '19 at 17:21
  • @EpicPandaForce could you know whats problem? – DolDurma Feb 19 '19 at 17:47
  • @EpicPandaForce removing Realm from project resolve my problem – DolDurma Feb 19 '19 at 17:59
  • It looks like you're using `annotationProcessor` scope for Dagger even though you're using `kapt`? – EpicPandaForce Feb 19 '19 at 18:07
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/188697/discussion-between-doldurma-and-epicpandaforce). – DolDurma Feb 19 '19 at 18:14

1 Answers1

3

Problem resolved, after change annotationProcessor to kapt

DolDurma
  • 15,753
  • 51
  • 198
  • 377