建立专案时发生错误:资源连结失败

时间:2019-01-15 10:10:58

标签: android android-studio build.gradle

我收到此错误

Android resource linking failed
Output:  error: resource style/CardView (aka [packagename].qa:style/CardView) not found
error: style attribute 'attr/cardElevation (aka (packagename).qa:attr/cardElevation)' not found.

错误在这里显示

</style>
    <style name="Widget.MaterialComponents.CardView" parent="CardView">
    <item name="cardElevation">@dimen/mtrl_card_elevation</item>
    <item name="cardBackgroundColor">?attr/colorBackgroundFloating</item>
  </style> 

我尝试了cleaninvalid cache and restart,更新了android studio,但仍然显示错误

1 个答案:

答案 0 :(得分:0)

检查所需的调光(如果存在),或使用“?attr”获得的风格