Getting below error while updating the compose-ui ...
# compose
g
Getting below error while updating the compose-ui version to
1.4.0-aplha05
Kotlin version : 1.7.20 compiler version: 1.3.2 P.S. :
1.4.0-aplha04
works fine. Any help is appreciated, thanks!!
Copy code
* What went wrong:
Execution failed for task ':app:checkProdInReleaseDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk8-1.7.20 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20)
     Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.20 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20)
     Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations$ReflectSdkVersion found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.20 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20)
     Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk8-1.7.20 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20)
     Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations$ReflectSdkVersion found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk8-1.7.20 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20)
     Duplicate class kotlin.io.path.DirectoryEntriesReader found in modules kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and kotlin-stdlib-jdk7-1.7.20 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20)
m
This is just a wild guess but you are still using Kotlin 1.7.20 but 1.40-alpha05 seems to be built with 1.8.0. In Kotlin 1.8.0 they have merged the various variants of the stdlib into one. Maybe you are puling in the old variants and the new merged one and thus get this conflict. As I said - just a wild guess.
s
I’d say bump to Kotlin 1.8, and compose compiler to 1.4.0 (for kotlin compatibility) and then try again. If it persists then it’s a problem. Otherwise I’m guessing it’s exactly what Michael said.
g
thanks, but no where in release notes its mentioned that kotlin 1.8 is required for
1.40-alpha05
, will check with 1.8
107 Views