What is a kapt exception?

324 views Asked by At

What is a KaptExecution (org.jetbrains.kotlin.gradle.internal.KaptExecution) and what causes them and how to stop this kind of exceptions?

1

There are 1 answers

0
cactustictacs On

Kapt is an annotation processor for Kotlin - it does processing on annotations during compilation, usually generating code for libraries that use annotations, like Room. (You add an annotation and it ~magically~ turns into lots of working code when you build the app)

So the exceptions are from when the processor is running, and it runs into some issue - it's usually a bad parameter, something you haven't specified, a configuration it doesn't know how to generate and it needs more info... that kind of thing.

If you look in the Build window (the one that's showing the exception message), click the level above that and it should show you detail about what went wrong, and hopefully some information about what you need to do to fix it.