IntelliJ complains 'Kotlin not configured' with Kotlin 1.2

Answered

When working with 

<kotlin.version>1.2.0-rc-84</kotlin.version>

IDE works fine.

But when upgrading to 

<kotlin.version>1.2.0</kotlin.version>

IntelliJ complains Kotlin not configured like this :

After I clicking Configure , it just duplicate kotlin-stdlib-jdk8 to my pom.xml , which I already has this ...

 

relative snippets in pom.xml :

 

<properties>
<!--<kotlin.version>1.2.0-rc-84</kotlin.version>-->
<kotlin.version>1.2.0</kotlin.version>
<kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
</properties>

<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core</artifactId>
<version>0.19.3</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>


The problem occurs in 2017.2 and after upgrading to latest 2017.3 , it still the exists.

Clean , rebuild project doesn't help.

 

Note : Not only the coroutine part , IntelliJ doesn't recognize all kotlin code. After downgrading to 1.2.0-rc84 , everything works fine.

 

0
1 comment

Well , after deleting all 

~/.m2/repository/org/jetbrains/kotlin

And let maven re-grab 1.2.0's dependencies , everything works fine now.

 

0

Please sign in to leave a comment.