title: How to resolve this error: Caused by: java.lang.IllegalArgumentException: com.example.MyClassName does not represent a declared type?
body: <p>I am getting this error while building my Kotlin/Android application?</p>
  <pre><code>Caused by: java.lang.reflect.InvocationTargetException
          at jdk.internal.reflect.GeneratedMethodAccessor812.invoke(Unknown Source)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:90)
          at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:31)
          at org.jetbrains.kotlin.kapt3.base.Kapt.kapt(Kapt.kt:45)
          ... 30 more
  Caused by: com.sun.tools.javac.processing.AnnotationProcessingError: java.lang.IllegalArgumentException: com.example.MyClassName does not represent a declared type
          at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:992)
          at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:896)
          at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1222)
          at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1335)
          at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1258)
          ... 35 more
  Caused by: java.lang.IllegalArgumentException: com.example.MyClassName does not represent a declared type
          at dagger.shaded.auto.common.MoreTypes$CastingTypeVisitor.defaultAction(MoreTypes.java:948)
          at dagger.shaded.auto.common.MoreTypes$CastingTypeVisitor.defaultAction(MoreTypes.java:939)
          at jdk.compiler/com.sun.tools.javac.code.Type$ErrorType.accept(Type.java:2394)
          at dagger.shaded.auto.common.MoreTypes.asDeclared(MoreTypes.java:579)
          at dagger.internal.codegen.base.Keys$1.visitDeclared(Keys.java:89)
          at dagger.internal.codegen.base.Keys$1.visitDeclared(Keys.java:66)
          at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.accept(Type.java:1151)
          at dagger.internal.codegen.base.Keys.isValidImplicitProvisionKey(Keys.java:65)
          at dagger.internal.codegen.base.Keys.isValidImplicitProvisionKey(Keys.java:50)
  </code></pre>
  <p>I am using dagger2 for dependency injection, in my application, the application uses a module that has a dependency on another module. What should be the correct way to resolve this dependency?</p>