I am trying to include compose (1.0.0-alpha06) in ...
# compose
p
I am trying to include compose (1.0.0-alpha06) in an existing project which is using kotlin (1.4.10), But I am getting build error due to 'kotlin-android-extensions' unbound symbols not allowed for kotlinx.android.synthetic.mainActivity As of now is there any workaround to use compose without removing all the code which uses kotlinx.android.synthetic, because that is a cumbersome.
j
Compose is not compatible with synthetics
So you have to remove the android extension plugin in your gradle config
p
@Javier you are right but removing all the synthetic will need time.. so looking for a workaround for now
j
I think there is no workaround, btw synthetics are deprecated too, maybe you should try to migrate to viewBinding first, and later use compose
I don't know if creating compose views in another module and using it in app can work like it solves the problem with Room or Kotlin Serialization
j
Theoretically you could run a global search and replace when you just want sth to work and switch fully to Compose anyway
also I could not get kotlix.serialization to work with compose, it somehow stressed out Gradle
j
you can use kotlin serialization but avoid having the serialization plugin in the same module. I even can pass kotlin serialization classes with
navigation-compose
j
I prefer waiting until I can have both (or is there a deeper problem with that?)
j
you can have both but not in the same module
I don't know if it is going to be fixed soon, I hope so
j
We will see soon enough Switched back to Gson for now