java.lang.RuntimeException: You have to provide a ViewHolder with a constructor which takes a view!

GitHub | AndrazP | 10 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

    AbstractItem RuntimeException

    GitHub | 10 months ago | AndrazP
    java.lang.RuntimeException: You have to provide a ViewHolder with a constructor which takes a view!
  2. 0

    RuntimeException: You have to provide a ViewHolder with a constructor which takes a view!

    GitHub | 11 months ago | shubhamchaudhary
    java.lang.RuntimeException: You have to provide a ViewHolder with a constructor which takes a view!

    Root Cause Analysis

    1. java.lang.RuntimeException

      You have to provide a ViewHolder with a constructor which takes a view!

      at com.mikepenz.fastadapter.items.AbstractItem$ReflectionBasedViewHolderFactory.create()
    2. com.mikepenz.fastadapter
      AbstractAdapter.onCreateViewHolder
      1. com.mikepenz.fastadapter.items.AbstractItem$ReflectionBasedViewHolderFactory.create(AbstractItem.java:343)
      2. com.mikepenz.fastadapter.items.AbstractItem.getViewHolder(AbstractItem.java:284)
      3. com.mikepenz.fastadapter.items.AbstractItem.getViewHolder(AbstractItem.java:233)
      4. com.mikepenz.fastadapter.FastAdapter$OnCreateViewHolderListenerImpl.onPreCreateViewHolder(FastAdapter.java:1326)
      5. com.mikepenz.fastadapter.FastAdapter.onCreateViewHolder(FastAdapter.java:330)
      6. com.mikepenz.fastadapter.AbstractAdapter.onCreateViewHolder(AbstractAdapter.java:128)
      6 frames
    3. Android v7
      RecyclerView$ViewFlinger.run
      1. android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5482)
      2. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4707)
      3. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4617)
      4. android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1994)
      5. android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1390)
      6. android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1353)
      7. android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1180)
      8. android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1031)
      9. android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4061)
      9 frames
    4. Android Platform
      ActivityThread.main
      1. android.view.Choreographer$CallbackRecord.run(Choreographer.java:788)
      2. android.view.Choreographer.doCallbacks(Choreographer.java:591)
      3. android.view.Choreographer.doFrame(Choreographer.java:559)
      4. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:774)
      5. android.os.Handler.handleCallback(Handler.java:808)
      6. android.os.Handler.dispatchMessage(Handler.java:103)
      7. android.os.Looper.loop(Looper.java:193)
      8. android.app.ActivityThread.main(ActivityThread.java:5333)
      8 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Method.java)
      2. java.lang.reflect.Method.invoke(Method.java:515)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
      2 frames
    7. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(NativeStart.java)
      1 frame