cardCornerRadius shows error
Thanks all for trying to solve the question. At last I got the answer for my question:
- Import the card view and recycle view separately from
sdk/extras/v7/cardview
sdk/extras/v7/recycleview
- right click on the imported projects go to properties and check the library box.
- Now go the main project where you are working and add these two libraries by right clicking on the project go to properties-->android(left side)-->click add(library) (right bottom side) and the required libraries.
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
Above is sufficient.
Add these dependencies to build.gradle.
Use the keyword implementation
instead of compile
as it has been deprecated
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support:appcompat-v7:26.1.0'
then use
app:cardCornerRadius="5dp"
instead of
card_view:cardCornerRadius="5dp"
This worked for me
app:cardCornerRadius="5dp"
app:cardElevation="2dp"