title: A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution > java.lang.reflect.InvocationTargetException (no error message)
body: <p>Android studio gave the error:</p>
  <pre><code>Execution failed for task ':app:kaptDebugKotlin'.
  &gt; A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
     &gt; java.lang.reflect.InvocationTargetException (no error message)
  </code></pre>
  <p>I want to add in my project Kotlin Coroutines and use it with Room database. But after added all libraries I got this error. This is all information from the compiler.</p>
  <p>I have identified, This is because of the annotation @Database. If I removed this annotation, the error don't appear, but Room is not working too.</p>
  <p>My gradle file:</p>
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'kotlin-android'
  apply plugin: 'kotlin-android-extensions'
  apply plugin: 'kotlin-kapt'
  //apply plugin: 'androidx.navigation.safeargs'
  
  kotlin {
      experimental {
          coroutines 'enable'
      }
  }
  
  android {
      compileSdkVersion 29
      defaultConfig {
          applicationId &quot;com.bestcred.coursetthree&quot;
          minSdkVersion 21
          targetSdkVersion 29
          versionCode 1
          versionName &quot;1.0&quot;
  
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
          //vectorDrawables.useSupportLibrary = true
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  
      // Enables data binding.
      buildFeatures {
          dataBinding true
      }
  }
  
  dependencies {
  
  
      implementation &quot;org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version&quot;
  
      // Support libraries
      implementation &quot;androidx.appcompat:appcompat:1.2.0&quot;
      implementation 'com.google.android.material:material:1.2.0'
      implementation &quot;androidx.fragment:fragment:1.2.5&quot;
      implementation &quot;androidx.constraintlayout:constraintlayout:2.0.0&quot;
  
      // Android KTX
      implementation 'androidx.core:core-ktx:1.3.1'
  
      // Room and Lifecycle dependencies
      implementation &quot;androidx.room:room-runtime:$room_version&quot;
      implementation 'androidx.legacy:legacy-support-v4:1.0.0'
      kapt &quot;android.arch.persistence.room:compiler:$room_version&quot;
  
      // Kotlin Extensions and Coroutines support for Room
      implementation &quot;androidx.room:room-ktx:$room_version&quot;
  
      // Coroutines
      implementation &quot;org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutine_version&quot;
      implementation &quot;org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version&quot;
  
  }
  
  kotlin_version = &quot;1.4.0&quot;
  room_version = &quot;2.2.5&quot;
  coroutine_version = '1.3.9'
  </code></pre>
  <p>I update Room version and add Kotlin Coroutines. What's problem?<a href="https://i.stack.imgur.com/Apjb0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Apjb0.png" alt="enter image description here" /></a></p>