从谷歌codelabs上克隆的软件,在Android Studio中构建的时候提示:

A problem was found with the configuration of task ‘:app:compileDebugKotlin’ (type ‘KotlinCompile’).

  • In plugin ‘kotlin-android’ type ‘org.jetbrains.kotlin.gradle.tasks.KotlinCompile’ property ‘classpathFqNamesHistoryDir$kotlin_gradle_plugin’ annotated with @Internal should not be also annotated with @Optional.

原因
猜测是版本的问题。😥

解决方法
直接把Gradle版本改成6.7.1就行了。

评论