igorvd
08/29/2018, 12:58 PMError while generating the main dex list
Running with the stacktrace, I can see that this is the cause:
Caused by: com.android.tools.r8.errors.CompilationError: Program type already present: kotlinx.coroutines.experimental.AbstractContinuation
at com.android.tools.r8.utils.ProgramClassCollection.resolveClassConflictImpl(ProgramClassCollection.java:64)
at com.android.tools.r8.utils.ProgramClassCollection.lambda$create$0(ProgramClassCollection.java:25)
at java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:1990)
at com.android.tools.r8.utils.ProgramClassCollection.create(ProgramClassCollection.java:24)
at com.android.tools.r8.graph.LazyLoadedDexApplication$Builder.build(LazyLoadedDexApplication.java:124)
at com.android.tools.r8.dex.ApplicationReader.read(ApplicationReader.java:123)
at com.android.tools.r8.dex.ApplicationReader.read(ApplicationReader.java:86)
at com.android.tools.r8.GenerateMainDexList.run(GenerateMainDexList.java:41)
at com.android.tools.r8.GenerateMainDexList.run(GenerateMainDexList.java:111)
at com.android.builder.multidex.D8MainDexList.generate(D8MainDexList.java:83)
... 56 more
Searching for jars that contains the AbstractContinuation
, I can see that is present in:
org.jetbrains.kotlinx:kotlin-coroutines-core:0.25.0
org.jetbrains.kotlinx:kotlin-coroutines-core-common:0.25.0
But my only dependency in build.gradle is: org.jetbrains.kotlinx:kotlinx-coroutines-android:0.25.0
I've notice that going back to version 0.23.4 fixed the problem. Maybe it's a bug with the version 0.25.0
. I can't test using the 0.24.0
, because I need the runBlocking
in some parts.dekans
08/29/2018, 1:32 PMigorvd
08/29/2018, 1:36 PMdekans
08/29/2018, 1:46 PMIt seems that you need R8 to be enabled un your gradle.propertiesFrom the comments of this issue. I stick to v0.24 until we have a fix 😞
igorvd
08/29/2018, 1:58 PM