我正在使用gradle,我正在尝试添加kotlin到我的项目中.但是,当我尝试添加kotlin插件时,gradle它无法找到它.
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'
}
Run Code Online (Sandbox Code Playgroud)
我收到这个错误
Caused by: org.gradle.api.plugins.UnknownPluginException: Plugin with id 'kotlin' not found.
Run Code Online (Sandbox Code Playgroud)
问题是什么?
| 归档时间: |
|
| 查看次数: |
14783 次 |
| 最近记录: |