I\'m trying to add CardView to my activity as the official sample. But it does
You should add it to your build.gradle:
build.gradle
dependencies { ... implementation 'com.android.support:cardview-v7:21.+' implementation 'com.android.support:recyclerview-v7:21.+' ... }