Fabio
12/08/2021, 5:28 AMNo matching variant of androidx.compose.runtime:runtime:1.1.0-beta01 was found. The consumer was configured to find an API of a library compatible with Java 15, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally but:
- Variant 'releaseVariantReleaseApiPublication' capability androidx.compose.runtime:runtime:1.1.0-beta01 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 environment (preferred optimized for standard JVMs)
- Doesn't say anything about its target Java version (required compatibility with Java 15)
when I copy the sample imageView
into my pre-existing project and run build
I noticed that I can change the version required in the following block, but I still don't understand the nature of the error, and I don't know how to reproduce in imageviewer
folder of the compose-jb/examples
itself, only when copied as a subfolder of my project
kotlin {
jvm {
withJava()
}
sourceSets {
named("jvmMain") {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":desktop:common"))
implementation("androidx.compose.foundation:foundation:1.1.0-beta02")
}
}
}
}
example/imageviewer
in git@github.com:JetBrains/compose-jb.git
olonho
12/08/2021, 5:45 AMbuild
in imageviewer works, likely you made some changes to script, i.e. different Gradle version.Fabio
12/08/2021, 5:49 AMimplementation(compose.desktop.currentOs)
I get compiler errrors as expected:
> Task :desktop:desktop:compileKotlinJvm FAILED
e: ...desktop/src/jvmMain/kotlin/example/imageviewer/Main.kt: (3, 8): Unresolved reference: androidx
sourceSets {
named("jvmMain") {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":common"))
implementation("androidx.compose.foundation:foundation:1.0.1")
}
}
}
even though it says it fails somehow
:desktop:dependencies
--> \--- androidx.compose.foundation:foundation:1.0.1 FAILED