title: After adding Kapt plugin - A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
body: <p>First of all,</p>
  <p>I'm pretty much aware that a lot of questions on this error had been posted already here, and none of them seems to be having a proper solution especially the one I need.</p>
  <p>I'm stuck with the following error for over a week.</p>
  <p>I'm working on an android project which is being built using Kotlin, MVVM, Clean Arch, and Navigation Components.</p>
  <p>I recently added realm database, and for that I had to add the following plugins.</p>
  <pre><code>apply plugin: 'kotlin-kapt'
  
  apply plugin: 'realm-android'
  </code></pre>
  <p>The real problem started from here I think.</p>
  <p>(After that I added a DatabaseManager class which makes use of some realm extension functions I wrote to make db operations.)</p>
  <p>When I compile the project after this, the following error occurred overall.</p>
  <pre><code>A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
  </code></pre>
  <p>Along with the following</p>
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  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)
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
  Use '--warning-mode all' to show the individual deprecation warnings.
  See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
  
  BUILD FAILED in 7s
  30 actionable tasks: 6 executed, 24 up-to-date
  </code></pre>
  <p>It points to my MainActivity class which is unaltered and doesn't seem to have any errors or typos for that matter. <strong>I'm pretty much sure that the kapt annotation processor does some dirty job here that I do not seem to figure out.</strong></p>
  <p><a href="https://i.stack.imgur.com/J9Bns.png" rel="noreferrer"><img src="https://i.stack.imgur.com/J9Bns.png" alt="enter image description here" /></a></p>
  <p>I will be greatly relieved if I could get past this weird error.</p>
  <p>Additional note:</p>
  <ol>
  <li><p>I have separated my entire project into three modules. All three got kapt plugin (just incase)</p>
  </li>
  <li><p>I use Koin for DI</p>
  </li>
  </ol>
  <p>Hope someone will help me out!</p>