Outdated Kotlin Runtime message after upgrading to 1.1.4


#1

I get:

Your version of Kotlin runtime in 'Maven: org.jetbrains.kotlin:kotlin-stdlib:1.1.4' library is 1.1.4, while plugin version is 1.1.4-release-IJ2017.2-2.

This is with <kotlin.version>1.1.4-2</kotlin.version>.
Using 1.1.4 makes no difference.

A quick search shows that this issue tends to repeat itself: https://stackoverflow.com/questions/43928118/outdated-kotlin-runtime-warning-kotlin-plugin-1-1-2-release-studio2-3-3

What can I do to resolve it and prevent it from happening in the future?


#2

There’s an answer in the stack overflow you linked to…You have to look at the error message and whatever is the -N at the end put that N in your kotlin.version

In this instance

<kotlin.version>1.1.4-2</kotlin.version>


#3

That’s exactly what I have there, as I mentioned in my question.


#4

Sorry, I apparently don’t read very well :frowning:

This fixed it for me though…are you in intelli-J or Android Studio? Did you clean caches?


#5

Cleaning caches, or perhaps re-importing the project / resynchronising the project with Maven?


#6

I use IntelliJ IDEA 2017.2.2, Build #IC-172.3757.52. Invalidating caches and restarting didn’t help. I also tried going to Maven Projects, cleaning and reimporting, to no avail.

EDIT: I should mention that everything builds and works perfectly, I just keep getting this warning.


#7

Maybe grep the project for all 1.1.4 or kotlin.version ? Possible that one of the older kotlin plugins inserted kotlin version in multiple places?


#8

That sounds like while you have 1.1.4-2 of the maven plug-in you have a kotlin-stdlib dependency that is still 1.1.4. Suggest searching for kotlin-stdlib in your project to check.


#9

Thanks! That did it. I had it like that

    <dependency>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-stdlib-jre8</artifactId>
        <version>${kotlin.version}</version>
    </dependency>

Removed the “-jre8” part and the warning is gone.