Cannot build project with latest Coroutines version
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
> 1 exception was raised by workers:
com.android.builder.merge.DuplicateRelativeFileException: More than one file was found with OS independent path 'META-INF/atomicfu.kotlin_module'
This is my app build gradle :
api 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.21'
api 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.0-alpha'
api 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.0-alpha'
This is an Android toolchain-specific issue.
Please use
packagingOptions {
exclude 'META-INF/atomicfu.kotlin_module'
}
@qwwdfsad I understand and thanks for your fast reply, but is OK to use is as permanent , or just as workaround for the moment till it will be solved in following Android releases ?
It just a workaround
@qwwdfsad I'm confused, how is this a toolchain issue? Can you provide an issue link please? I'm getting something slightly different:
Caused by: java.util.zip.ZipException: duplicate entry: META-INF/atomicfu.kotlin_module
@qwwdfsad What do you mean by saying "it's just a workaround" and closing the issue at the same time? What are the action points? Are you saying that the problem is not related to kotlinx.coroutines at all? If this is a workaround, do you know what is the (potentially future) solution?
Sorry, I should have provided more details.
I've explained them here: https://github.com/Kotlin/kotlinx.coroutines/issues/1064#issuecomment-479412940
Great
Most helpful comment
This is an Android toolchain-specific issue.
Please use