本文介绍了IntelliJ(使用gradle):即使安装了Kotlin插件也找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图用gradle构建我的项目,但它似乎找不到我的kotlin插件,即使我使用从磁盘安装插件添加它。
这是我收到的错误:
Can anyone help me with this? I'd really like to build my project.
解决方案
I can guess that you doesn't have repository in build.gradle, so please compare your build file with following, and then make "Gradle Refresh" in Idea.
buildscript {
ext.kotlin_version = '<version to use>'
repositories {
mavenCentral()
// or better:
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: "kotlin"
repositories {
mavenCentral()
// or better:
jcenter()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
Pay more attention to buildscript part of config: repositories here is necessary!
I got config from here, with my little refinements.
这篇关于IntelliJ(使用gradle):即使安装了Kotlin插件也找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!