```java.lang.LinkageError: loader constraint viola...
# compose
n
Copy code
java.lang.LinkageError: loader constraint violation: when resolving method "kotlin.coroutines.AbstractCoroutineContextKey.<init>(Lkotlin/coroutines/CoroutineContext$Key;Lkotlin/jvm/functions/Function1;)V" the class loader (instance of org/jetbrains/android/uipreview/ModuleClassLoader) of the current class, kotlinx/coroutines/CoroutineDispatcher$Key, and the class loader (instance of com/intellij/ide/plugins/cl/PluginClassLoader) for the method's defining class, kotlin/coroutines/AbstractCoroutineContextKey, have different Class objects for the type kotlin/coroutines/CoroutineContext$Key used in the signature
	at kotlinx.coroutines.CoroutineDispatcher$Key.<init>(CoroutineDispatcher.kt:35)
	at kotlinx.coroutines.CoroutineDispatcher$Key.<init>(CoroutineDispatcher.kt:35)
	at kotlinx.coroutines.CoroutineDispatcher.<clinit>(CoroutineDispatcher.kt)
	at kotlinx.coroutines.CoroutineContextKt.createDefaultDispatcher(CoroutineContext.kt:23)
	at kotlinx.coroutines.Dispatchers.<clinit>(Dispatchers.kt:33)
	at androidx.ui.core.WrapperKt$doSetContent$compositionWrapper$1$setContent$1.invoke(Wrapper.kt:178)
	at androidx.ui.core.WrapperKt$doSetContent$compositionWrapper$1$setContent$1.invoke(Wrapper.kt)
	at androidx.compose.internal.RestartableFunction.invoke(RestartableFunction.kt:132)
	at androidx.compose.internal.RestartableFunction.invoke(RestartableFunction.kt)
	at androidx.compose.ComposerKt.invokeComposable(Composer.kt:2052)
	at androidx.compose.Recomposer.recompose(Recomposer.kt:77)
    ...
j
I got same error on AS 4.1 Canary 8 with
dev10
as well. Feels like AS issue
a
what version of coroutines do you use? could you try to change it to
1.3.0
? I saw similar issue when I tried to use
1.3.4
j
Working with
1.3.0
. Thanks!
a
what version did you use before? I want to keep track what versions are affected
j
1.3.4
n
works for me as well! thanks
z
@Andrey Kulikov Is there an issue tracking this?
a
it is happening because of our forked version of Kotlin. I was able to verify that we work fine with the latest version 1.3.6 of coroutines. also the dev 12 will use this version be default
👍 2
z
Oh awesome, thanks!
150 Views