zero.one
zero.one

Reputation: 1553

How to import AndroidViewBinding in jetpack compose

I'm trying to use some fragments within jetpack compose but I can not import AndroidViewBinding from (androidx.compose.ui.viewinterop) and it is always appearing as an unresolved name

how to import it ??

Upvotes: 6

Views: 7905

Answers (1)

Dmitri
Dmitri

Reputation: 2972

I just came against the same problem - unresolved. Turns out, we need to import:

implementation "androidx.compose.ui:ui-viewbinding:$compose_uiversion"

See here for more info - (latest stable version is 1.3.2)

Just another example where I wish they really made their documentation explicit about dependencies. This official documentation doesn't help.

Upvotes: 19

Related Questions