Error:(1, 0) Plugin with id 'kotlin-android-extensions' not found

前端 未结 3 1614
借酒劲吻你
借酒劲吻你 2021-01-07 15:55
apply plugin: \'kotlin-android-extensions\'.

When i add this extensions in android studio preview, give me this error \"Error:(1, 0) Plugin with id

3条回答
  •  鱼传尺愫
    2021-01-07 16:37

    In Android Studio we can fix it in following ways:_

    Using the plugins Domain Specific Language (DSL) in App Level Graddle:

    plugins {
        id "org.jetbrains.kotlin.android.extensions" version "1.4.21"
    }
    

    That's all to fix it.

    But if you're using legacy plugin application, then add the following in App Level Gradle:

    buildscript {
      repositories {
        maven {
          url "https://plugins.gradle.org/m2/"
        }
      }
      dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21"
      }
    }
    
    apply plugin: "org.jetbrains.kotlin.android.extensions"
    

    Hopefully, it'll be helpful!

提交回复
热议问题