Based on the official documentation,
I can see TextClock seems to be supported now in new GlanceAPI as a Remote view, but I can not used in our example code,
class RemoteWidget : GlanceAppWidget(errorUiLayout = R.layout.widget_error_layout) {
override val stateDefinition: GlanceStateDefinition<*>
get() = CustomGlanceStateDefinition
@Composable
override fun Content() {
val pref = currentState<Preferences>()
Column(
modifier = GlanceModifier
.fillMaxSize()
.background(color = Color.Green)
.padding(8.dp)
) {
Text(
text = LocalContext.current.getString(R.string.app_name)
)
TextClock() //Error
AndroidView(factory = { TextClock(it) }) //Error
}
}
I don't know how to use TextClock in GlanceWidget

Glance has indeed interoperability with all available RemoteViews. You need to use the AndroidRemoteView composable part of Glance.
Note that you are using the AndroidView composable instead.
Here is an example: