Execution failed for task ‘:app:kaptDebugKotlin‘ [How to Solve]

Error compiling project with kotlin:

Execution failed for task ‘:app:kaptDebugKotlin’.
A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
java.lang.reflect.InvocationTargetException (no error message)
various kotlin annotation errors will be reported

The problem is that the version of kotlin plug-in is inconsistent with that in build

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

Check the version of the org.jetbrains.kotlin:kotlin-gradle-plugin is consistent with the version of the kotlin that the module depends on or not.

Read More: