Error inflating class android.support.design.widget.TabLayout

后端 未结 4 379
长发绾君心
长发绾君心 2020-12-03 14:53

I\'m trying to create a menu tab based on Google\'s \"material design\" using Eclipse, but I got an error:

Error inflating class android.support.desig

4条回答
  •  眼角桃花
    2020-12-03 15:28

    I also faced similar issue. After some research on issue I find the solution. Add another style resource for your tablayout.

    I have described it on my blog also.

    http://www.geeksmember.blogspot.in/2015/10/errorerror-inflating-class.html

    Add this to your values-v21/styles.xml. If you don't have values-v21 folder create one in app/res folder. And then create a styles.xml file in that folder.

        
    
        
        
    
        
    
    

    And then add custom style attribute to your tablayout.

    
    

    I also faced the same problem and this works like a charm.

    Reference: https://code.google.com/p/android/issues/detail?id=175582

提交回复
热议问题