how to solve error like This version (1.1.1) of the Compose Compiler requires Kotlin version 1.6.10 but you appear to be using Kotlin version …
After solving the error Duplicate class kotlin.collections.jdk8.Collections JDK8Kt… i create new issue that display this on my screen :
This version (1.1.1) of the Compose Compiler requires Kotlin version 1.6.10 but you appear to be using Kotlin version
In your case, it might look the same way but with different versions numbers. I believe this can be solve if you match your current kotlin version with your compose compiler.
If like me , you used kotlin version 1.8.22 before seing this error, you just have to copy-paste the solution.
This version (1.1.1) of the Compose Compiler requires Kotlin version 1.6.10 but you appear to be using Kotlin version…
Here the step by step method to solve it :
- Go to second build.gradle file ( with the module name )
- replace the code below
composeOptions { kotlinCompilerExtensionVersion = "1.1.1" }
- with this one
composeOptions { kotlinCompilerExtensionVersion = "1.4.8" }
After this, if you don’t setup kotlin version properly, you may get Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt… error.
If you use the same version like mine, you just have to setup kotlin android version to 1.8.22.
From now, everything should work like expected. Happy coding !!