14赞
502
当前位置:  开发笔记 > 编程语言 > 正文

没有找到id`kotlin`的插件

如何解决《没有找到id`kotlin`的插件》经验,为你挑选了1个好方法。

我正在使用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'

}

我收到这个错误

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

问题是什么?



1> miensol..:

你有一个错字.它应该是

buildscript {

而不是buidscript.


推荐阅读
author-avatar
拍友2602937077
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有