0

I've created a new Android project with Kotlin support. When I try to add apply plugin: 'kotlin-kapt' to build.gradle file, Gradle fails to sync the project. Here's the error:

Folder path\to\project\app\build\generated\source\kaptKotlin\debug

Folder path\to\project\app\build\generated\source\kaptKotlin\release


3rd-party Gradle plug-ins may be the cause

I've done some research and found out that the targetSdkVersion might be the problem. I'm using SDK 28 now, and the problem is not gone. What I'm trying to understand is that, I have a block like this:

dependencies {
    kapt "androidx.room:room-compiler:$room_version"
}

and this builds fine without apply plugin at the top. Is it necessary to apply kapt plugin? If it is, how do I solve the error above? Thanks.

0 Answers0