java.lang.ClassCastException: android.support.v7.widget.LinearLayoutCompat cannot be cast to android.support.v7.widget.RecyclerView

Stack Overflow | khoi | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    android: receive exception when view next tab

    Stack Overflow | 8 months ago | khoi
    java.lang.ClassCastException: android.support.v7.widget.LinearLayoutCompat cannot be cast to android.support.v7.widget.RecyclerView

    Root Cause Analysis

    1. java.lang.ClassCastException

      android.support.v7.widget.LinearLayoutCompat cannot be cast to android.support.v7.widget.RecyclerView

      at com.example.user.recyclerviewpagerfragment.Fragments.DocumentaryFragment.onCreateView()
    2. com.example.user
      DocumentaryFragment.onCreateView
      1. com.example.user.recyclerviewpagerfragment.Fragments.DocumentaryFragment.onCreateView(DocumentaryFragment.java:30)
      1 frame
    3. Android Support v4
      ViewPager$3.run
      1. android.support.v4.app.Fragment.performCreateView(Fragment.java:2080)
      2. android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1108)
      3. android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1290)
      4. android.support.v4.app.BackStackRecord.run(BackStackRecord.java:801)
      5. android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1638)
      6. android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:679)
      7. android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:143)
      8. android.support.v4.view.ViewPager.populate(ViewPager.java:1240)
      9. android.support.v4.view.ViewPager.populate(ViewPager.java:1088)
      10. android.support.v4.view.ViewPager$3.run(ViewPager.java:275)
      10 frames
    4. Android Platform
      ActivityThread.main
      1. android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
      2. android.view.Choreographer.doCallbacks(Choreographer.java:670)
      3. android.view.Choreographer.doFrame(Choreographer.java:603)
      4. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
      5. android.os.Handler.handleCallback(Handler.java:739)
      6. android.os.Handler.dispatchMessage(Handler.java:95)
      7. android.os.Looper.loop(Looper.java:148)
      8. android.app.ActivityThread.main(ActivityThread.java:5417)
      8 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      2 frames