<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>
I got this error message
Cannot resolve symbol ?attr/selectableItemBackground
Validates resource references inside Android XML files.
<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"/>
And, I got a similar error for the above as well
Cannot resolve symbol '@style/TextAppearance.AppCompat.Headline'
Validates resource references inside Android XML files.
Any pointer would be great! Thank you! It seems to be related to this thread but no solution was provided:
I believe this is a communication problem with the IDE and Android Gradle Plugin. In any case, the only way I've reliably found to resolve this is to delete the problematic libs in the .idea/libraries/
folder.
So, for you, since the lint checks aren't recognizing ?attr/selectableItemBackground
Gradle__com_android_support_xxx.xml
filesI've tried other suggested solutions - had the appcompat-v7
dependency in my module build.gradle file & the google()
repository as the first line in the project build.gradle dependencies. Nada.
These solutions also haven't helped...