获取IntelliJ Kotlin插件和gradle来匹配

Jas*_*ues 2 java intellij-idea gradle kotlin

我正在尝试IntelliJ 16,早期访问版本,但我的项目不会编译:

Error:(16, 17) Kotlin: Unresolved reference: substring
(note: this may be caused by the fact that some classes compiled with 
an incompatible version of Kotlin were found in the classpath. Such 
classes cannot be loaded properly by this version of Kotlin compiler. 
Run Code Online (Sandbox Code Playgroud)

据推测,Kotlin的Gradle和IntelliJ版本需要匹配,但安装的Kotlin插件是: 1.0.0-rc-1007-IJ143-11

我没有在任何公共存储库中看到这一点.我在gradle项目中声明的最新版本是:

buildscript {
    ext.kotlin_version = ' 1.0.0-rc-1007-IJ143-11'
Run Code Online (Sandbox Code Playgroud)

..IntelliJ 16可以与Kotlin和Gradle一起使用吗?

hot*_*key 5

总之,科特林IDEA插件RC( ,1.0.0-rc-1007,1017)1025与测试版不兼容的库,和RC库版本是不是在Maven的中央呢.

要使用它们,您必须添加EAP存储库:

repositories {
    // ...
    maven { url 'https://dl.bintray.com/kotlin/kotlin-eap/' }
}
Run Code Online (Sandbox Code Playgroud)

两者buildscript和项目部分.

此外,你kotlin_version的不正确,它不应该有-IJ143-11一部分.使用1.0.0-rc-1025.

另一个解决方案是将Kotlin插件回滚到Beta版,其中包括删除它(pluginsIDEA安装的子文件夹,因为它预装在EAP 16中)并再次从ZIP发行版安装Beta版.

要了解有关EAP构建的更多信息,请参阅此主题.


UPD:

RC已与工件一起发布.