<android.support.v7.widget.CardView
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/card_outer_padding"
android:layout_marginTop="@dimen/card_outer_padding"
android:layout_marginRight="@dimen/card_outer_padding"
android:layout_marginBottom='@{model.cardBottomMargin}'
android:foreground="?attr/selectableItemBackground"
android:onClick="@{model::onCardClick}"
app:cardElevation="2dp"
app:cardCornerRadius="2dp"
app:cardUseCompatPadding="true">
</android.support.v7.widget.CardView>
我收到了这个错误消息
无法解析symbol ?attr/selectableItemBackground
验证Android XML文件中的资源引用。
<TextView
android:id="@+id/country_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="40dp"
android:text="@{model.name}"
style="@style/TextAppearance.AppCompat.Headline"
tools:text="Country"/>
而且,我在上面也得到了一个类似的错误
无法解析符号“@style/TextAppearance.AppCompat.Headline”
验证Android XML文件中的资源引用。
任何指针都可以!谢谢!它似乎与此thread有关,但没有提供任何解决方案:
https://stackoverflow.com/questions/44007653
复制相似问题