A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution android android

A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution


Android Studio's UI was just hiding the error...

when the error occurred, it highlighted the item in the list view, and showed an unhelpful message in the terminal view.bad bad

to find the real error, select the root item in the list view so that Android Studio would display the whole build output in the terminal view, then scroll to find error.good good


Maybe I am a bit late for the answer but, anyways, I was getting the same error. The build failure can be caused by some error that Android Studio fails to point out probably due the the project size being very large.

Here is the easy way to point out the exact error.

  1. In Android studio go to Analyze menu and click on Inspect Code; check whole project, click OK and wait for the inspection to finish.

    Inspect Code

  2. Now you will see a tab that will point all the errors, warnings etc and you can now resolve the real issue.

    Errors tab


The way to find out what the underlying issue is, is to run the following command :

./gradlew assembleDebug --stacktrace