After adding Kapt plugin - A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

Replacing

kapt "android.arch.persistence.room:compiler:$room_version"

by

implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"

might fix it as well.


I had the same problem because i had forgotten to add a converter in a list included in entity..In room you have to add converters in order to store lists in databas


After a week's struggle, I finally found the issue.

I added the kotlin-kapt plugin for realm.

And I had a folder named interface itself to hold some interfaces.

I implemented one of the interfaces from the interface folder in MainActivity.

Now the import for the interface was something like this,

import com.android.app.java.interface.Listener

Where, the keyword interface confused the annotation processor, hence caused error while generating stub.

I renamed the folder (from interface to intrface).

That solved the error.

This is a very simple mistake that cost me a week.

Anyway, found the issue. Yay!