I am working on a android project using Kotlin, Databinding and Room. Sometimes the build fails with a error message, containing no information about what exactly went wrong, except that it has something to do with the annotation processor (which can have many causes...).
shortened Example:
org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing org.jetbrains
[more stack trace lines]
Caused by: org.jetbrains.kotlin.kapt3.base.util.KaptBaseError: Error while annotation processing
[even more stack trace lines]
at org.jetbrains.kotlin.kapt3.base.Kapt.kapt(Kapt.kt:45)
... 32 more
Finding the cause, then means time consuming backtracking of my steps (and maybe using git stash) and guessing, when one the 32 hidden lines at the end seems likely to contain some useful information about what actually went wrong.
So the question is: how to show the full stack trace?
I tried setting the -Xmaxerrs 500 in my build.gradle as shown here https://kotlinlang.org/docs/reference/kapt.html#java-compiler-options as well as various variants of this, I found on SE (sorry, don't remember which exactly).
None made any difference. Maybe i put the block in the wrong part? (tried module level, android -> defaultConfig -> kapt)
Add kapt.verbose=true to your project's gradle.properties file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With