android jetpack compose kotlin synthetic extension support

1.2k views Asked by At

I'm getting Unbound symbols not allowed compiler error during integration compose to a big project. It seems it doesn't support synthetic extentions. Is there a way to use compose with synthetic extentions? My project is too big to migrate at once and heavily use synthetic extentions. If not do you know that is there a plan for support this soon? Thanks in advance.

e: java.lang.AssertionError: Unbound symbols not allowed
    Unbound public symbol for public kotlinx.android.synthetic.main.activity_normal/txt.<get-txt>|-845173590652748007[0]
1

There are 1 answers

0
CyrilFind On

Synthetics are deprecated so there is no plan to support them anywhere: you should migrate to ViewBinding ASAP (it's not that hard)

But supporting them in Compose actually does not make sense: since Compose is Declarative and not imperative, you don't use ids or any "access method", you probably need to rethink how to do things with Compose

Maybe try to explain what you are trying to do exactly ?