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

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

    To fix this problem . first you must add cardview from the

    1. Close the main project.
    2. Remove the android-support-v7-appcompat .
    3. Restart the Eclipse.
    4. Add the android-support-v7-appcompat .
    5. Clean,To build the project.
    6. Then open the main project and build all the projects.
    7. The error still remains. Restart eclipse. That's it.

    That works for me.

提交回复
热议问题