下面的文字给我的组成错误,我不知道我做错了什么
Text(
text = stringResource(R.string.meaning_word),
modifier = Modifier
.padding(6.dp)
.align(alignment = Alignment.Start)
.fillMaxHeight(0.3f),
colors = AppColors.mOffWhite,
fontSize = 17.sp,
fontWeight = FontWeight.Bold,
lineHeight = 22.sp
)
我得到以下错误没有以下函数可以调用提供的参数。
Text(AnnotatedString, Modifier = ..., Color = ..., TextUnit = ..., FontStyle? = ..., FontWeight? = ..., FontFamily? = ..., TextUnit = ..., TextDecoration? = ..., TextAlign? = ..., TextUnit = ..., TextOverflow = ..., Boolean = ..., Int = ..., Map<String, InlineTextContent> = ..., (TextLayoutResult) → Unit = ..., TextStyle = ...) defined in androidx.compose.material
Text(String, Modifier = ..., Color = ..., TextUnit = ..., FontStyle? = ..., FontWeight? = ..., FontFamily? = ..., TextUnit = ..., TextDecoration? = ..., TextAlign? = ..., TextUnit = ..., TextOverflow = ..., Boolean = ..., Int = ..., (TextLayoutResult) → Unit = ..., TextStyle = ...) defined in androidx.compose.material
我尝试了以下答案One of the following functions can be called with the arguments supplied没有帮助
1条答案
按热度按时间8cdiaqws1#
这是因为没有带
colors
参数的文本函数。它的颜色也需要更改对齐。开始是对齐。水平到其中之一