繁体   English   中英

获取IntelliJ Kotlin插件和gradle进行配对

[英]Get IntelliJ Kotlin plugin and gradle to match up

我正在尝试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. 

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

我在任何公共存储库中都没有看到这个。 我在gradle项目中声明的最新一项是:

buildscript {
    ext.kotlin_version = ' 1.0.0-rc-1007-IJ143-11'

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

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

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

repositories {
    // ...
    maven { url 'https://dl.bintray.com/kotlin/kotlin-eap/' }
}

buildscript和项目部分。

另外,您的kotlin_version不正确,不应包含-IJ143-11部分。 使用1.0.0-rc-1025

另一个解决方案是将Kotlin插件回滚到Beta版本,这涉及到将其删除(IDEA安装的plugins子文件夹,因为它预先安装在EAP 16中),然后从ZIP发行版中再次安装Beta。

要了解有关EAP构建的更多信息,请参考本主题


UPD:

RC已与工件一起发布。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM