Error inflating class and android.support.v7.widget.CardView

后端 未结 15 1633
-上瘾入骨i
-上瘾入骨i 2020-11-27 20:47

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         


        
15条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-27 21:28

    A related note: if you're using the support libraries, you're pretty sure your dependencies are correct, and you got here via a search for "Error inflating class CardView," then make sure your XML layout is using and not just !

    The two errors are pretty similar and it took me a few minutes to facepalm when I realized that I wasn't paying attention to the full class name in the error message and I was using the non-support in my layout without realizing it.

提交回复
热议问题