kotlin 在当前主题中找不到“@attr/TextAppearanceButton”

cnwbcb6i  于 2022-11-16  发布在  Kotlin
关注(0)|答案(2)|浏览(170)

我想添加扩展浮动操作按钮到我的android项目应用程序,但得到了一个错误,说未能找到@attr/TextAppearanceButton在当前主题。我已经实现了材料依赖性在build.grade模块。我是新的Android开发。请我需要帮助🙏🏾。

shyt4zoc

shyt4zoc1#

将您的styles.xml更改为如下所示

<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
3yhwsihp

3yhwsihp2#

您可以使用**?attr/而不是@attr/来引用它们。例如-?attr/colorPrimary**。

相关问题