Refrence
https://metapx.org/plugin-with-id-kotlin-android-not-found/
To fix the error, you need to add kotlin-gradle-plugin to your build.gradle file as shown below:
plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
// 添加下面这一句
id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
The latest Android Studio lists the dependencies using Gradle plugins DSL as shown on Kotlin plugins for Gradle documentation.
该博客介绍了如何修复在构建Android项目时遇到的Kotlin Android插件未找到的错误。通过在build.gradle文件中添加'org.jetbrains.kotlin.android'插件的依赖,可以解决此问题。更新后的build.gradle文件应包含最新的Kotlin版本号,例如1.6.21,并执行清理任务以删除构建目录。
2482

被折叠的 条评论
为什么被折叠?



