Plugin with id `kotlin` not found

I am using gradle and I am trying to add kotlin to my project. But when I try to add the kotlin plugin for gradle , it will not be able to find it.

 apply plugin: 'groovy' apply plugin: 'kotlin' buidscript { ext.kotlin_version = '1.0.1-2' repositories { jcenter() mavenCentral() } dependencies { classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.1-2' } } repositories { jcenter() } dependencies { compile 'org.codehaus.groovy:groovy-all:2.4.6' compile 'org.antlr:antlr4:4.5.3' testCompile 'org.spockframework:spock-core:1.0-groovy-2.4' testCompile 'junit:junit:4.12' compile 'org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version' } 

I get this error

 Caused by: org.gradle.api.plugins.UnknownPluginException: Plugin with id 'kotlin' not found. 

What is the problem?

+5
source share
1 answer

You have a typo. It should be

 buildscript { 

instead of buidscript .

+9
source

Source: https://habr.com/ru/post/1246380/


All Articles