Using kotlin.sourceSets DSL to add Kotlin sources is not allowed with built-in Kotlin. Kotlin source set 'debug' contains: [D:\...\app\build\generated\ksp\debug\kotlin, D:\...\build\generated\ksp\debug\java] Solution: Use android.sourceSets DSL instead. For more information, see https://developer.android.com/r/tools/built-in-kotlinTo suppress this error, set android.disallowKotlinSourceSets=fals..