在java的android的项目中添加Kotlin的Module时,提示如图所示的错误
解决办法:
在buildscript下面的dependencie中添加classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
如图:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.4"
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.38.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
转自:
Plugin with id 'kotlin-android' not found._yukun314的专栏-CSDN博客
https://blog.csdn.net/yukun314/article/details/78395291
Plugin with id 'kotlin-android' not found._yukun314的专栏-CSDN博客