小编Ris*_*hli的帖子

任何处理器都无法识别 Kapt 选项

我不明白为什么 kotlin 注释处理器无法解析这些参数。

我的 build.gradle.kts 的相关部分

plugins {
    id("kotlin-kapt")
}

android {
    defaultConfig {
        kapt {
            arguments {
                arg("room.incremental", "true")
                arg("room.schemaLocation", "$projectDir/schemas")
            }
        }
    }
}

dependencies {
    implementation("androidx.room:room-runtime:${Versions.room_version}") // room_version = "2.2.4"
    kapt("androidx.room:room-compiler:${Versions.room_version}")
    implementation("androidx.room:room-ktx:${Versions.room_version}")
}

Run Code Online (Sandbox Code Playgroud)

我得到的确切警告是

> Task :app:kaptDebugKotlin
warning: The following options were not recognized by any processor: '[room.schemaLocation, kapt.kotlin.generated, room.incremental]'
The following options were not recognized by any processor: '[room.schemaLocation, kapt.kotlin.generated, room.incremental]'
Run Code Online (Sandbox Code Playgroud)

android gradle kotlin android-room gradle-kotlin-dsl

4
推荐指数
1
解决办法
4712
查看次数