-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't build project with Kotlin 1.7.0 stable version #2108
Comments
There's no version of compose-jb that support Kotlin 1.7.0 yet. |
Duplicate of #2075 I am using Compose with Kotlin 1.7.0 and it's working great. You need to use the latest build |
I still get |
@zeruth that looks like a different error. Are you sure you replaced the compose compiler version dependency with |
I can't find any documentation or api to override compiler version on desktop-jvm. Seems to only be allowed in android block. |
Yes, I haven't found any documentation about this either, but I can share the solution. Just use compose-jb version
|
@Thomas-Vos Thanks for the snippet! It helped me. By any change did you get it working on JS? I'm getting: e: java.lang.IllegalStateException: IdSignature clash: androidx.compose.runtime/ComposableInferredTarget.<init>|1280618353163213788[0]; Existed declaration CONSTRUCTOR visibility:public <> (scheme:kotlin.String) returnType:androidx.compose.runtime.ComposableInferredTarget [primary] clashed with new CONSTRUCTOR visibility:public <> (scheme:kotlin.String) returnType:androidx.compose.runtime.ComposableInferredTarget [primary] That only seems to happen on JS, other targets including JVM, Android and K/N seems to not be complainting (tried to remove that annotation but then I get a different error) |
I'm only targeting Android and desktop JVM. No idea how to solve your error unfortunately. You could try searching the compose-web Slack channel for Kotlin 1.7. |
For compose web you could use |
Thanks guys. In my case I need JS, JVM, Android and K/N (linux, windows, mac & iOS) working with the same configuration because I'm doing a custom applier for my game engine, so it must work for all the targets. |
Yeah, I wait until an official alpha too. |
@Thomas-Vos Snippet worked like a charm, thanks for the tip! |
Just in case, if someone getting Kotlin: 1.7.0 Caused by: java.lang.NullPointerException at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1838) at java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) at org.jetbrains.compose.ComposePlugin.apply$lambda-6$lambda-5(ComposePlugin.kt:129)
Solution:
|
Thanks to eymar a new snapshot is available, rebased on androidx with 1.7.0 support: 0.0.0-release1.2-integration-dev736 Keep in mind it is not even an alpha, only a dev snapshot. |
Kotlin 1.7.0 is supported in 1.2.0-alpha01-dev741, so I guess this can be closed @igordmn. |
With the following compose dependencies:
and also this
How did you fix this?
|
@GuilhE Do you want to use the "android" compose compiler? Otherwise I would suggest to use the JetBrains published one. |
I want to use the android-compose in my This setup works for:
|
Okay, it should work too. But your actual error message is about fetching the JetBrains Desktop runtime dependencies, eg ui: |
Yup makes sense, but I've also added:
in the |
Ok I think I got it, I had to add:
in the project's |
FYI getting a NoSuchMethodError with Kotlin 1.7.20-RC and compose 1.2.0-alpha01-dev774
But on compose-compiler repo there's a table with matching compiler version
So using the dependency substitution shared in #2108 (comment) by @Thomas-Vos with this version, fixed the issue. configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("org.jetbrains.compose.compiler:compiler")).apply {
using(module("androidx.compose.compiler:compiler:1.4.0-dev-k1.7.20-RC-a143c065804"))
}
}
} |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Compose-JB version:
1.1.1
Kotlin version:
1.7.0 Stable
After updating Kotlin version to
1.7.0
in build.gradle.kts and trying to sync project, Gradle throws an error:Stacktrace:
Removing Compose-JB plugin from
gradle.build.kts
resolves the errorThe text was updated successfully, but these errors were encountered: