title: Cannot access ActivityCompatApi23 - Kotlin - AndroidX - Dagger 2.17
body: <p><strong>Short error log</strong>:  </p>
  
  <pre><code>&gt; :presentation:transformDataBindingWithDataBindingMergeArtifactsForDebug
  &gt; e: E:\MVVM\presentation\build\tmp\kapt3\stubs\debug\com\example\mvvm\ui\base\BaseActivity.java:9: error: cannot access ActivityCompatApi23
  public abstract class BaseActivity extends dagger.android.support.DaggerAppCompatActivity {
                  ^
    class file for android.support.v4.app.ActivityCompatApi23 not found
  e: java.lang.IllegalStateException: failed to analyze: java.lang.AssertionError: annotation tree hasn't been attributed yet: @kotlin.Metadata(mv = {1, 1, 11}, bv = {1, 0, 2}, k = 1, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b&amp;\u0018\u00002\u00020\u0001B\u0005\u00a2\u0006\u0002\u0010\u0002\u00a8\u0006\u0003"}, d2 = {"Lcom/example/mvvm/ui/base/BaseActivity;", "Ldagger/android/support/DaggerAppCompatActivity;", "()V", "presentation_debug"})
  </code></pre>
  
  <p><strong>Libraries' verions</strong>:</p>
  
  <pre><code>ext{
  minSdkVersion = 14
  targetSdkVersion = 28
  androidCompileSdkVersion = 28
  testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
  androidPluginVersion = '3.1.4'
  kotlinVersion = '1.2.70'
  supportVersion = '1.0.0-alpha1'
  daggerVersion = '2.17'
  roomVersion = '2.0.0-beta01'
  lifecycleVersion = '2.0.0-beta01'
  rxJavaVersion = '2.2.2'
  rxAndroidVersion = '2.1.0'
  supportTest = '1.1.0-alpha1'
  multidexVersion = '2.0.0'
  ...
  }
  
  kotlin: "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}",
  rxJava: "io.reactivex.rxjava2:rxjava:${rxJavaVersion}",
  rxAndroid: "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion",
  appCompat: "androidx.appcompat:appcompat:$supportVersion",
  material: "com.google.android.material:material:$supportVersion",
  supportv4: "androidx.legacy:legacy-support-v4:$supportVersion",
  appcompatv7: "androidx.appcompat:appcompat:$supportVersion",
  recyclerview: "androidx.recyclerview:recyclerview:$supportVersion",
  cardview: "androidx.cardview:cardview:$supportVersion",
  annotation: "androidx.annotation:annotation:$supportVersion",
  javaxInject: "javax.inject:javax.inject:$javaxInjectVersion",
  dagger: "com.google.dagger:dagger:${daggerVersion}",
  daggerAndroid: "com.google.dagger:dagger-android:${daggerVersion}",
  daggerAndroidSupport: "com.google.dagger:dagger-android-support:${daggerVersion}",
  daggerAndroidProcessor: "com.google.dagger:dagger-android-    processor:${daggerVersion}",
  daggerCompiler: "com.google.dagger:dagger-compiler:${daggerVersion}",
  room: "androidx.room:room-runtime:$roomVersion",
  roomCompiler: "androidx.room:room-compiler:$roomVersion",
  roomCommon: "androidx.room:room-common:$roomVersion",
  constraintLayout: "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion",
  multidex: "androidx.multidex:multidex:$multidexVersion",
  lifecycleExtensions: "androidx.lifecycle:lifecycle-extensions:$lifecycleVersion",
  lifecycleCommon: "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
  ...
  </code></pre>
  
  <p><strong>Android Studio version</strong>: 3.1.4  </p>
  
  <p><strong>BaseActivity</strong>:  </p>
  
  <pre><code>abstract class BaseActivity : DaggerAppCompatActivity()
  </code></pre>
  
  <p><strong>MyApplication</strong>:  </p>
  
  <pre><code>class MyApplication : DaggerApplication() {
  
      override fun applicationInjector(): AndroidInjector&lt;out DaggerApplication&gt; {
  
          return DaggerAppComponent.builder().create(this)
      }
  }
  </code></pre>
  
  <p><strong>AppComponent</strong>:  </p>
  
  <pre><code>@Singleton
  @Component(modules = [
      AndroidSupportInjectionModule::class,
      ViewModelBuilder::class,
      AppModule::class,
      BaseModule::class
  ])
  interface AppComponent : AndroidInjector&lt;MyApplication&gt; {
      @Component.Builder
      abstract class Builder : AndroidInjector.Builder&lt;MyApplication&gt;()
  }
  </code></pre>
  
  <p><strong>AppModule</strong>:  </p>
  
  <pre><code>@Module(includes = [NetModule::class, DbModule::class])
  abstract class AppModule {
  
      @ApplicationContext
      @Binds
      abstract fun provideApplicationContext(myApplication: MyApplication): Context
  }
  </code></pre>
  
  <p><strong>Full error log</strong>:  </p>
  
  <pre>
  :presentation:transformDataBindingWithDataBindingMergeArtifactsForDebug
  > e: E:\MVVM\presentation\build\tmp\kapt3\stubs\debug\com\example\mvvm\ui\base\BaseActivity.java:9: error: cannot access ActivityCompatApi23
  public abstract class BaseActivity extends dagger.android.support.DaggerAppCompatActivity {
                  ^
    class file for android.support.v4.app.ActivityCompatApi23 not found
  e: java.lang.IllegalStateException: failed to analyze: java.lang.AssertionError: annotation tree hasn't been attributed yet: @kotlin.Metadata(mv = {1, 1, 11}, bv = {1, 0, 2}, k = 1, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b&\u0018\u00002\u00020\u0001B\u0005\u00a2\u0006\u0002\u0010\u0002\u00a8\u0006\u0003"}, d2 = {"Lcom/example/mvvm/ui/base/BaseActivity;", "Ldagger/android/support/DaggerAppCompatActivity;", "()V", "presentation_debug"})
      at org.jetbrains.kotlin.analyzer.AnalysisResult.throwIfError(AnalysisResult.kt:56)
      at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:125)
      at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:161)
      at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:57)
      at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:96)
      at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:52)
      at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:93)
      at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:441)
      at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:101)
      at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:1020)
      at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:101)
      at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137)
      at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:1062)
      at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:1019)
      at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:440)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
      at sun.rmi.transport.Transport$1.run(Transport.java:200)
      at sun.rmi.transport.Transport$1.run(Transport.java:197)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: java.lang.AssertionError: annotation tree hasn't been attributed yet: @kotlin.Metadata(mv = {1, 1, 11}, bv = {1, 0, 2}, k = 1, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b&\u0018\u00002\u00020\u0001B\u0005\u00a2\u0006\u0002\u0010\u0002\u00a8\u0006\u0003"}, d2 = {"Lcom/example/mvvm/ui/base/BaseActivity;", "Ldagger/android/support/DaggerAppCompatActivity;", "()V", "presentation_debug"})
      at com.sun.tools.javac.util.Assert.error(Assert.java:133)
      at com.sun.tools.javac.util.Assert.checkNonNull(Assert.java:118)
      at com.sun.tools.javac.comp.Check.validateTypeAnnotation(Check.java:2745)
      at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitAnnotation(Attr.java:4484)
      at com.sun.tools.javac.tree.JCTree$JCAnnotation.accept(JCTree.java:2317)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
      at com.sun.tools.javac.tree.TreeScanner.visitModifiers(TreeScanner.java:315)
      at com.sun.tools.javac.tree.JCTree$JCModifiers.accept(JCTree.java:2343)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitClassDef(Attr.java:4566)
      at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:693)
      at com.sun.tools.javac.comp.Attr.validateTypeAnnotations(Attr.java:4473)
      at com.sun.tools.javac.code.TypeAnnotations$2.run(TypeAnnotations.java:142)
      at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:155)
      at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:129)
      at com.sun.tools.javac.comp.Enter.complete(Enter.java:512)
      at com.sun.tools.javac.comp.Enter.main(Enter.java:471)
      at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:982)
      at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:47)
      at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:27)
      at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.runAnnotationProcessing(Kapt3Extension.kt:213)
      at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:178)
      at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:96)
      at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:95)
      at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:105)
      at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:82)
      at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:375)
      at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:67)
      at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:107)
      at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:366)
      at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:120)
      ... 30 more
  
   > :presentation:kaptDebugKotlin FAILED
  
   > FAILURE: Build failed with an exception.
  
   > * What went wrong:
  Execution failed for task ':presentation:kaptDebugKotlin'.
  > Internal compiler error. See log for more details
  </pre>
  
  <p>I've read all of related questions such as:  </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/46928223/cannot-access-activitycompatapi23-class">Cannot access ActivityCompatApi23 class</a></li>
  <li><a href="https://stackoverflow.com/questions/45677543/cannot-acces-activitycompatapi23-when-trying-to-use-fragmentactivity">Cannot acces ActivityCompatApi23 when trying to use FragmentActivity</a></li>
  <li><a href="https://stackoverflow.com/questions/48072953/error59-8-error-cannot-access-activitycompatapi23-class-file-for-android-su?rq=1">Error:(59, 8) error: cannot access ActivityCompatApi23 class file for android.support.v4.app.ActivityCompatApi23 not found</a></li>
  <li><a href="https://stackoverflow.com/questions/51016661/cannot-access-activitycompatapi23-class-file">cannot access ActivityCompatApi23 class file</a></li>
  <li><a href="https://stackoverflow.com/questions/51463834/cannot-access-activitycompatapi23-class-file-for-activitycompatapi23-not-found">cannot access ActivityCompatApi23 class file for ActivityCompatApi23 not found</a></li>
  <li><a href="https://stackoverflow.com/questions/48072953/error59-8-error-cannot-access-activitycompatapi23-class-file-for-android-su">Error:(59, 8) error: cannot access ActivityCompatApi23 class file for android.support.v4.app.ActivityCompatApi23 not found</a></li>
  <li>...</li>
  </ul>
  
  <p>All of them say that the support libraries' versions are not the same; Or the <code>compileSdkVersion</code> have to be <strong>28</strong>.  </p>
  
  <p>I've considered all of these but the error still exists!</p>
  
  <p>I think there is something wrong/missed with using <strong>androidx</strong>, <strong>kotlin</strong>, and <strong>dagger</strong>; But I'm not sure what it is.</p>