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

后端 未结 15 1599
-上瘾入骨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:30

    I got error gone by Adding Dependencies

    The RecyclerView and CardView widgets are part of the v7 Support Libraries. To use these widgets in your project, add these Gradle dependencies to your app's module:

    dependencies { ... compile 'com.android.support:cardview-v7:21.0.+' compile 'com.android.support:recyclerview-v7:21.0.+' }

    http://developer.android.com/training/material/lists-cards.html

提交回复
热议问题