Kamel-Media / Kamel

Kotlin asynchronous media loading and caching library for Compose.
Apache License 2.0
657 stars 25 forks source link

No static method toByteArray(...) #116

Closed pcorreia89 closed 1 month ago

pcorreia89 commented 1 month ago

using ktor version 3.0.0-rc-2, using kamel version 1.0.0-beta.6

issue: No static method toByteArray(Lio/ktor/utils/io/ByteReadChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; in class Lio/ktor/util/ByteChannelsKt; or its super classes (declaration of 'io.ktor.util.ByteChannelsKt' appears in /data/data/studio.lostjoker.smartdealer.android.poker.debug/code_cache/.overlay/base.apk/classes22.dex)

build.gradle (:appShared)

        commonMain {
            dependencies {
                ...
                implementation("media.kamel:kamel-image-default:1.0.0-beta.6")
                implementation(libs.ktor.client.core)
                ...
            }
        }

        androidMain {
            dependencies {
                ...
                implementation("media.kamel:kamel-decoder-image-bitmap-resizing:1.0.0-beta.6")
            }
        }

appShared -> androidMain

    val kamelConfig = remember {
        KamelConfig {
            takeFrom(KamelConfig.Default)
            resourcesFetcher(context)
            imageBitmapResizingDecoder()
        }
    }

    CompositionLocalProvider(LocalKamelConfig provides kamelConfig) {
        launcher()
    }

settings.gradlew

If I dont include the following, it fails even though it says in beta.7 that it can be removed:

maven("https://maven.pkg.jetbrains.space/public/p/ktor/eap")

Is it a bug or am I missing something?

Thank you!

pcorreia89 commented 1 month ago

I've changed to beta.7 and it is working now.