appcompat - Missing resources for Android CardView library -


i'm using cardview in project , i'm getting error on older devices:

 e  android.view.inflateexception: binary xml file line #25: error inflating class android.support.v7.widget.cardview                         e      @ android.view.layoutinflater.createview(layoutinflater.java:518)                         e      @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:570)                         e      @ android.view.layoutinflater.rinflate(layoutinflater.java:623)                         e      @ android.view.layoutinflater.rinflate(layoutinflater.java:626)                         e      @ android.view.layoutinflater.inflate(layoutinflater.java:408)                         e      @ android.view.layoutinflater.inflate(layoutinflater.java:320) 

seems similar few questions on such this one

my problem solution questions feels hacky , that's understandable answer given last year when lollipop entered public preview. have things changed since? how resources?

i've tried few things such importing .aar module nothing seems work. i've followed official documentation on how add support libraries (https://developer.android.com/tools/support-library/setup.html#libs-with-res) didn't work. according link - there doesn't seem difference between adding libraries , without resources android studio?

my app build.gradle includes following dependencies:

compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.android.support:cardview-v7:21.0.3' compile 'com.android.support:recyclerview-v7:21.0.3' 

cardview layout used here

    <android.support.v7.widget.cardview         xmlns:card="http://schemas.android.com/apk/res-auto"         android:id="@+id/card_view"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:foreground="?android:attr/selectableitembackground"         card:cardcornerradius="6dp"         card:cardusecompatpadding="true"         tools:ignore="newapi"> 

edit: problem noticed on samsung s2 2.3 - api 19+ works fine

?android:attr/selectableitembackground platform related, use without android: prefix refer appcompat's attribute.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -