2

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]
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
DiRiNoiD
  • 1,281
  • 2
  • 18
  • 24
  • 2
    Does this answer your question? [Migrate to Jetpack compose error: Unbound symbols not allowed](https://stackoverflow.com/questions/63788205/migrate-to-jetpack-compose-error-unbound-symbols-not-allowed) – Ryan M Oct 03 '20 at 02:02
  • Nope, it says remove all kotlinx synthetic extentions, which is really difficult for huge projects. My question is that is there a way to use them both at the same time in a project? – DiRiNoiD Oct 03 '20 at 09:04
  • I have the same issue. – withoutname Oct 07 '20 at 13:02
  • Replace synthetics with viewbinding – EpicPandaForce Oct 07 '20 at 16:33
  • replacing existing synthetic binding is not an option for now for me, looking for a solution that I can integrate both. – DiRiNoiD Oct 09 '20 at 08:00
  • Hi. have you managed to find a solution to this? – Jono Oct 12 '20 at 15:50
  • Unfortunately no, there are some open tickets for google for this issue, I will wait for using jetpack compose until they solve this problem otherwise for bigger projects it is not eligible to migrate every synthetic binding at once. – DiRiNoiD Oct 17 '20 at 07:34
  • Same here, Compose is unusable without this working. All modern Kotlin projects rely heavily on Kotlin synthetics. – sachadso Oct 21 '20 at 08:39

1 Answers1

-1

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 ?

CyrilFind
  • 634
  • 1
  • 7
  • 16