java.lang.NoClassDefFoundError:android.support.v7.recyclerview.R $ styleable

时间:2015-09-01 14:46:10

标签: android android-layout intellij-idea android-recyclerview

java.lang.RuntimeException: Unable to resume activity {com.example.recyclerview/com.example.recyclerview.screen.HomeFragment}: **android.view.InflateException: Binary XML file line #7: Error inflating class android.support.v7.widget.RecyclerView**

     Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class android.support.v7.widget.RecyclerView
            at android.view.LayoutInflater.createView(LayoutInflater.java:623)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
            at com.example.recyclerview.screen.HomeFragment.onCreateView(HomeFragment.java:67)

     **Caused by: java.lang.NoClassDefFoundError: android.support.v7.recyclerview.R$styleable**
            at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:440)
            at android.support.v7.widget.RecyclerView.<init>(RecyclerView.java:409)
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
            at android.view.LayoutInflater.createView(LayoutInflater.java:597)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:699)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
            at com.example.recyclerview.screen.HomeFragment.onCreateView(HomeFragment.java:67)
            at 

我已将android-support-v7-recyclerview和android-support-v7-appcompat添加到我的项目中,但仍然收到此错误。我正在使用IDE作为Intellij Idea。

0 个答案:

没有答案