I want to use CardView in my project, but when I run my application, I get the following error. I\'m using Eclipse.
Error: Error inflating clas
@sunil
As said before:
Go to File -> Import -> Existing Android code into workspace --> Browse (Go to sdk/extras/android/support/v7/cardview) --> Click ok --> Click Finish
Right click on cardview project --> Properties --> Android(Left Pane) --> Enable isLibrary (tick the checkbox) --> Apply --> ok
Right click on your project --> Properties --> Android(Left pane) --> Add (under library) --> cardview --> apply --> ok
If this doesn't work, proceed to add and remove individual jar's of the same package from your now imported code's library project's folder android-support-v7-cardview/libs. Remove the Jar, clean the project and try it again. Remove the project one bloke suggested adding, remove any external Jar's related to cardview (I think these cause conflicts).
Clean the project and hopefully that works for you.
Note: I personally did have to change the cardview library's target build level from 4.0.3 to 5.0 then back to 4.1.2, cleaning the project each time, for it to work as well.