https://kotlinlang.org logo
#compose
Title
# compose
r

rajesh

07/03/2020, 1:40 PM
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

allan.conda

07/03/2020, 1:43 PM
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

shikasd

07/03/2020, 1:53 PM
Compose has some special extension set which is not supported by upstream compiler yet, so they use their own fork
r

rajesh

07/03/2020, 1:58 PM
@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

Leland Richardson [G]

07/03/2020, 3:02 PM
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

rajesh

07/04/2020, 9:05 AM
Thanks. working now with 1.3.70