https://kotlinlang.org logo
#chucker
Title
# chucker
s

Sairaj

04/28/2021, 4:01 AM
I am getting issues while compiling latest develop from jitpack. Can someone help please
Copy code
java.lang.RuntimeException: Duplicate class kotlinx.coroutines.AbstractCoroutine found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.Active found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.AwaitAll found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.AwaitAll$AwaitAllNode found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.AwaitAll$DisposeHandlersOnCancel found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.AwaitKt found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.AwaitKt$awaitAll$1 found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.AwaitKt$awaitAll$2 found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.AwaitKt$joinAll$1 found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.AwaitKt$joinAll$3 found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.BeforeResumeCancelHandler found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.BlockingCoroutine found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.BlockingEventLoop found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
  Duplicate class kotlinx.coroutines.BuildersKt found in modules jetified-kotlinx-coroutines-core-1.4.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1) and jetified-kotlinx-coroutines-core-jvm-1.4.3.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3)
Copy code
stageImplementation("com.github.chuckerteam.chucker:library:develop-SNAPSHOT") {
        exclude group: 'org.jetbrains.kotlinx', module: 'kotlinx-coroutines-core'
    }
this worked^
g

gammax

04/28/2021, 7:41 AM
That’s odd. Which version of
kotlinx-coroutines-core
do you have? Can you try to bump to 1.4.3?
s

Sairaj

04/29/2021, 4:06 AM
Strangely, I dont have
kotlinx-coroutines-core
in my project. only kotlin stdlib 1.3.50
g

gammax

04/29/2021, 7:10 AM
Would you be able to share a Gradle scan (run with
--scan
)? I’m afraid another library is pulling in a previous version of kotlinx-coroutines that is not compatible wiht 1.4.3
s

Sairaj

04/29/2021, 10:42 AM
yes
Do let me know your findings. I can see
1.4.1
conflicting. How do you see which library is pulling?
g

gammax

04/29/2021, 4:28 PM
I'll take a look later today 😊
So it’s the
lifecycle-livedata-ktx:2.3.1
library that is actually pulling in kotlinx-coroutines-core:1.4.1
I’ve done some manual testing but I’m not able to reproduce your issue 🤔 If you could provide a reproducer that would be awesome
38 Views