Error:Execution failed for task ':app:kaptDebugKotlin'

Run your application with ./gradlew clean build command to see what's exactly wrong with your code. Just paste it into the Terminal in Android Studio.


If you are using the Room database and getting a KAPT error, just check your

  1. Database declarations
  2. Data Access Object declarations
  3. Data class fields

It's a problem arising due to improper usage of annotations of Room. For more information use your build logs.

You can see here in this picture before expanding the error log, I can see the annotation missing error.