After updating support library version 27.1.0
Android Studio unable to render CardView. It shows error message as
failed to fi
updating the CardView
from 27.1.1 to 28.0.0-alpha3 fixed the XML preview for me on AS 3.1.3.
implementation "com.android.support:cardview-v7:28.0.0-alpha3"
it still complains, but it renders the preview.
there's also a new androidx class now, which should be the same:
implementation "androidx.cardview:cardview:1.0.0"
when updating com.android.support:design
to 28.0.0-alpha3
, it hints for:
The resource @style/CardView is marked as private in com.android.support:design
downgrading back to API 27 with buildTools 27.0.3 & supportLibrary 27.1.1 also prevents the issues. might upgrade to 28.0.0
with Android Studio 3.2 then.