I'm facing this error while using Android studio 4...
# compose
r
I'm facing this error while using Android studio 4.2 canary 3 and compose 0.1.0-dev14 with kotlin 1.4-M2 and getting this error while gradle building Class 'Kotlin.Unit' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler. Any help is appreciated.
a
have you set the following in your gradle? you have to set the version https://developer.android.com/jetpack/androidx/releases/compose
👍 1
looks like you can't use Compose with Kotlin 1.4-M2 atm
s
Compose has some special extension set which is not supported by upstream compiler yet, so they use their own fork
r
@John O'Reilly if I use 1.4-M1, still get same error. Any solution? Or we just need to wait because 1.3.70 depends on 1.4-M2?
l
You can only use compose with the version of kotlin that matches our kotlin fork (this is temporary). At the moment this is 1.3.70
r
Thanks. working now with 1.3.70