我花了几个小时尝试部署 2 个无服务器组件,但我无法找到出现此错误的原因:
@Composable
fun ComposableExample() {
...
ScrollableColumn(modifier = Modifier.fillMaxWidth()) {
// Scrollable column should have one child.
Column {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
) {
Text(text = "This is the Title of the Video")
//--------- This column is rendering on wider (tablet+) screens but not phone sized screens.
Column(horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier.fillMaxWidth()) {
Image(imageResource(id = R.drawable.icon_download_arrow),
modifier = Modifier.preferredSize(20.dp)
.clickable(onClick = { }))
Text(text = "Download")
}
// ---------
}
...
}
}
}
每次都被提升。我无法运行任何命令,我总是收到该错误。