https://kotlinlang.org logo
Title
f

Frank

08/07/2021, 9:33 AM
Hi! I’m trying to include the Coil-Library in my test project: I’ve added the following line to my build script:
implementation("io.coil-kt:coil:1.3.2")
But then I build i I get the following error message(s):
Could not resolve all files for configuration ‘:compileClasspath’.
> Could not resolve io.coil-kt:coil:1.3.2. Required by: project : > No matching variant of io.coil-kt:coil:1.3.2 was found. The consumer was configured to find an API of a library compatible with Java 15, Any ideas how to solve this?
o

Oliver.O

08/07/2021, 11:19 AM
Seems like the version you are looking for is not available in the repositories you have defined. I could find this one via IntelliJ IDEA Dependencies:
implementation("io.coil-kt:coil:1.3.1")
f

Frank

08/07/2021, 11:20 AM
No the version is available but somehow it doesn’t work with Compose Desktop
Because it is a AAR
o

Oliver.O

08/07/2021, 11:20 AM
Have you tried 1.3.1?
f

Frank

08/07/2021, 11:21 AM
yes
No matching variant of io.coil-kt:coil:1.3.1 was found. The consumer was configured to find an API of a library compatible with Java 15, preferably in the form of class files, and its dependencies declared externally, as well as attribute ‘org.jetbrains.kotlin.platform.type’ with value ‘jvm’ but: - Variant ‘releaseApiPublication’ capability io.coil-kt:coil:1.3.1 declares an API of a library, and its dependencies declared externally: - Incompatible because this component declares a component, with the library elements ‘aar’ and the consumer needed a component, preferably in the form of class files - Other compatible attributes: - Doesn’t say anything about its target Java version (required compatibility with Java 15) - Doesn’t say anything about org.jetbrains.kotlin.platform.type (required ‘jvm’) - Variant ‘releaseRuntimePublication’ capability io.coil-kt:coil:1.3.1 declares a runtime of a library, and its dependencies declared externally: - Incompatible because this component declares a component, with the library elements ‘aar’ and the consumer needed a component, preferably in the form of class files - Other compatible attributes: - Doesn’t say anything about its target Java version (required compatibility with Java 15) - Doesn’t say anything about org.jetbrains.kotlin.platform.type (required ‘jvm’)
o

Oliver.O

08/07/2021, 11:29 AM
Did not know about Coil before. As the doc says "An image loading library for Android" it seems pretty clear that there's no way on desktop.
a

Ali Albaali

08/08/2021, 9:45 PM
You can checkout Kamel. It works for both android and desktop.