'kotlin kapt3 KaptBaseError: Error while annotation processing ::For Room Database

I am running into this strange issue in the Room database operation classes. There are lot of Annotations are used, starting from Database then Entity, DAO... Not sure why and where this issue is coming from. build.gradle file has the updated library references and there are no reference errors while using any of the annotations at their right places. Then why this error? Spent quite a good amount of time to find out the real problem. But still not resolved.

Finally observed that removing the '@Database' Annotation is the issue disappeared. But nothing different than the standard statement I had used inside the '@Database'.

Here is the exception details:

Caused by: org.jetbrains.kotlin.kapt3.base.util.KaptBaseError: Error while annotation processing
    at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:121)
    at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:31)
    at org.jetbrains.kotlin.kapt3.base.Kapt.kapt(Kapt.kt:45)
    ... 30 more```


Solution 1:[1]

make sure you have this in you gradle

annotationProcessor "androidx.room:room-compiler:2.4.2"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 3ameration