I generated a signed bundle for compose wear app, ...
# compose-wear
y
I generated a signed bundle for compose wear app, and got an error
cannot find symbol
@Preview()
, during the debug build is everything fine, how can i get my bundle built? I assume the the preview tool is only in debug mode available?
It turns out I defined
debugImplementation
for
androidx.compose.ui:ui-tooling
. I thought the compose preview code shall not be build by the compose compiler for release, why the
debugImplementation
doesn’t work. Is there a way to remove the compose preview code during the release build?
y
Yep, this is why there are two ui-tooling jars. One for annotation and one for the preview runtime.
Copy code
debugImplementation "androidx.compose.ui:ui-tooling:1.3.2"
implementation "androidx.compose.ui:ui-tooling-preview:1.3.2"