🌻 A pluggable, highly optimized Jetpack Compose and Kotlin Multiplatform image loading library that fetches and displays network images with Glide, Coil, and Fresco.
Describe the Bug:
When I add implementation("com.github.skydoves:landscapist-coil3:2.3.8") then the app fails at runtime with below logs. I do not even have to change anything in code base, just adding the dependency make the app crash on runtime
when making a request
java.lang.NoClassDefFoundError: Failed resolution of: Lio/ktor/client/plugins/HttpTimeout;
at io.ktor.client.engine.android.AndroidClientEngine.<init>(AndroidClientEngine.kt:32)
at io.ktor.client.engine.android.Android.create(Android.kt:31)
at io.ktor.client.HttpClientKt.HttpClient(HttpClient.kt:43)
at io.ktor.client.HttpClientJvmKt.HttpClient(HttpClientJvm.kt:23)
at com.app.di.AppModuleKt.appModule$lambda$17$lambda$9(appModule.kt:45)
at com.app.di.AppModuleKt.$r8$lambda$oFeSoYTcOKK3-7thA8JgWhk7B0o(Unknown Source:0)
at com.app.di.AppModuleKt$$ExternalSyntheticLambda9.invoke(Unknown Source:4)
at org.koin.core.instance.InstanceFactory.create(InstanceFactory.kt:50)
at org.koin.core.instance.SingleInstanceFactory.create(SingleInstanceFactory.kt:46)
at org.koin.core.instance.SingleInstanceFactory$get$1.invoke(SingleInstanceFactory.kt:55)
at org.koin.core.instance.SingleInstanceFactory$get$1.invoke(SingleInstanceFactory.kt:53)
at org.koin.mp.KoinPlatformTools.synchronized(KoinPlatformTools.kt:36)
at org.koin.core.instance.SingleInstanceFactory.get(SingleInstanceFactory.kt:53)
at org.koin.core.registry.InstanceRegistry.resolveInstance$koin_core(InstanceRegistry.kt:109)
at org.koin.core.scope.Scope.resolveValue(Scope.kt:247)
at org.koin.core.scope.Scope.resolveInstance(Scope.kt:233)
at org.koin.core.scope.Scope.get(Scope.kt:212)
at com.app.di.AppModuleKt$appModule$lambda$17$$inlined$factoryOf$default$1.invoke(FactoryOf.kt:228)
at com.app.di.AppModuleKt$appModule$lambda$17$$inlined$factoryOf$default$1.invoke(FactoryOf.kt:60)
at org.koin.core.instance.InstanceFactory.create(InstanceFactory.kt:50)
at org.koin.core.instance.FactoryInstanceFactory.get(FactoryInstanceFactory.kt:38)
at org.koin.core.registry.InstanceRegistry.resolveInstance$koin_core(InstanceRegistry.kt:109)
at org.koin.core.scope.Scope.resolveValue(Scope.kt:247)
at org.koin.core.scope.Scope.resolveInstance(Scope.kt:233)
at org.koin.core.scope.Scope.get(Scope.kt:212)
at com.app.di.AppModuleKt.appModule$lambda$17$lambda$15(appModule.kt:95)
at com.app.di.AppModuleKt.$r8$lambda$2G8oFeI4w-XvntI_pxTvjEIhfMY(Unknown Source:0)
at com.app.di.AppModuleKt$$ExternalSyntheticLambda13.invoke(Unknown Source:4)
at org.koin.core.instance.InstanceFactory.create(InstanceFactory.kt:50)
at org.koin.core.instance.FactoryInstanceFactory.get(FactoryInstanceFactory.kt:38)
at org.koin.core.registry.InstanceRegistry.resolveInstance$koin_core(InstanceRegistry.kt:109)
at org.koin.core.scope.Scope.resolveValue(Scope.kt:247)
at org.koin.core.scope.Scope.resolveInstance(Scope.kt:233)
at org.koin.core.scope.Scope.get(Scope.kt:212)
at org.koin.compose.viewmodel.KoinViewModelFactory.create(ViewModelInternals.kt:71)
at androidx.lifecycle.viewmodel.ViewModelProviderImpl_androidKt.createViewModel(ViewModelProviderImpl.android.kt:34)
at androidx.lifecycle.viewmodel.ViewModelProviderImpl.getViewModel$lifecycle_viewmodel_release(ViewModelProviderImpl.kt:65)
at androidx.lifecycle.viewmodel.ViewModelProviderImpl.getViewModel$lifecycle_viewmodel_release$default(ViewModelProviderImpl.kt:47)
at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.android.kt:91)
at org.koin.compose.viewmodel.ViewModelInternalsKt.resolveViewModel(ViewModelInternals.kt:49)
at com.app.presentation.ComposableSingletons$AppKt$lambda-3$1.invoke(App.kt:197)
at com.app.presentation.ComposableSingletons$AppKt$lambda-3$1.invoke(App.kt:47)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:401)
at androidx.compose.material3.TextKt.ProvideTextStyle(Text.kt:349)
at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:69) (Ask Gemini)
at androidx.compose.material3.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:68)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:380)
at androidx.compose.material3.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:60)
at com.app.presentation.theme.ThemeKt.Theme(Theme.kt:37)
at com.app.presentation.ComposableSingletons$AppKt$lambda-4$1.invoke(App.kt:47)
at com.app.presentation.ComposableSingletons$AppKt$lambda-4$1.invoke(App.kt:46)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at org.koin.compose.KoinApplicationKt$KoinContext$1.invoke(KoinApplication.kt:147)
at org.koin.compose.KoinApplicationKt$KoinContext$1.invoke(KoinApplication.kt:146)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:380)
at org.koin.compose.KoinApplicationKt.KoinContext(KoinApplication.kt:143)
at com.app.presentation.AppKt.App(App.kt:46)
at com.app.presentation.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:18)
at com.app.presentation.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:17)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:441)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:259)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:258)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:380)
at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:216)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:132)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:131)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:380)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:121)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:155)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:154)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:401)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:154) (Ask Gemini)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:133)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:97)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3593)
at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3520)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:743)
at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1122)
at androidx.compose.runtime.CompositionImpl.composeInitial(Composition.kt:649)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:635)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:133)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:124)
at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1625)
at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:124)
at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:180)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.jvm.kt:320)
at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.jvm.kt:198)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:131)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:124)
at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1706)
at android.view.View.dispatchAttachedToWindow(View.java:21290)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3491)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2820)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2328)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9087)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1231)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
at android.view.Choreographer.doCallbacks(Choreographer.java:899)
at android.view.Choreographer.doFrame(Choreographer.java:832)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.ClassNotFoundException: Didn't find class "io.ktor.client.plugins.HttpTimeout" on path: DexPathList[[zip file "/data/app/~~rmbB8aDKj1Fy5DeI-Zzvjw==/com.app-hscWVa59TIwDLfe-zGp2KQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~rmbB8aDKj1Fy5DeI-Zzvjw==/com.app-hscWVa59TIwDLfe-zGp2KQ==/lib/x86_64, /data/app/~~rmbB8aDKj1Fy5DeI-Zzvjw==/com.app-hscWVa59TIwDLfe-zGp2KQ==/base.apk!/lib/x86_64, /system/lib64, /system_ext/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379) (Ask Gemini)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 129 more
similar thing happens if I just add implementation(libs.coil3.network.ktor3), maybe it is a bug on their side?
I just found you use ktor 2.x.x, as you can expect on the dependency name, you should use ktor3. Please try this again with the ktor verseion 3.0.0-rc-1.
Please complete the following information:
Describe the Bug: When I add
implementation("com.github.skydoves:landscapist-coil3:2.3.8")
then the app fails at runtime with below logs. I do not even have to change anything in code base, just adding the dependency make the app crash on runtime when making a requestsimilar thing happens if I just add
implementation(libs.coil3.network.ktor3)
, maybe it is a bug on their side?Those are my deps
and this is my build file