https://kotlinlang.org logo
#coroutines
Title
# coroutines
o

oshai

11/27/2018, 2:00 PM
I am having an issue with 1.0.1:
java.lang.NoClassDefFoundError: kotlinx/coroutines/SupervisorJobImpl
when I run dependencies this is what I see:
Copy code
mvn dependency:tree | grep kotlin
[INFO] |     \- io.github.microutils:kotlin-logging:jar:1.6.20:compile
[INFO] |        \- io.github.microutils:kotlin-logging-common:jar:1.6.20:compile
[INFO] |  \- org.jetbrains.kotlin:kotlin-stdlib:jar:1.2.71:compile
[INFO] |     +- org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.2.71:compile
[INFO] |     |  +- org.jetbrains.kotlinx:kotlinx-coroutines-core:jar:1.0.1:compile
[INFO] |     |  |  \- org.jetbrains.kotlinx:kotlinx-coroutines-core-common:jar:1.0.1:compile
[INFO] |     |  \- org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:jar:1.0.1:runtime
[INFO] +- org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.3.10:compile
[INFO] |  \- org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.3.10:compile
[INFO] +- org.jetbrains.kotlin:kotlin-test:jar:1.3.10:test
[INFO] |  \- org.jetbrains.kotlin:kotlin-test-common:jar:1.3.10:test
l

louiscad

11/27/2018, 2:02 PM
Please give more context. The target platform to begin with?
o

oshai

11/27/2018, 2:16 PM
jvm (java 8)
when I run a test it fails with this exception
when I excluded 1.2.71 it is ok, but I fail to understand why
l

louiscad

11/27/2018, 2:19 PM
Doesn't 1.2.71 take precedence because of another module relying on a dependency compiled with this version, without specifying the version itself?
o

oshai

11/27/2018, 2:24 PM
1.2.71 was only for the stdlib the only version for coroutines that I see is 1.0.1
c

christophsturm

11/27/2018, 2:46 PM
coroutines 1.0 probably needs a 1.3.x stdlib
l

louiscad

11/27/2018, 2:49 PM
Of course it does need 1.3.x stdlib
o

oshai

11/27/2018, 3:31 PM
why?
g

gildor

11/27/2018, 4:28 PM
Because this is the first Kotlin version that supports non-experimental coroutines
o

oshai

11/27/2018, 4:29 PM
Thanks I forgot that
4 Views