java.lang.ClassCastException: android.widget.ImageView cannot be cast to uk.co.senab.photoview.PhotoView

GitHub | wenmingvs | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    【CrashLog】 WeiSwift 2016-07-27 17:55:43:957

    GitHub | 8 months ago | wenmingvs
    java.lang.ClassCastException: android.widget.ImageView cannot be cast to uk.co.senab.photoview.PhotoView
  2. 0

    【CrashLog】 WeiSwift 2016-07-27 17:15:20:91

    GitHub | 8 months ago | wenmingvs
    java.lang.ClassCastException: android.widget.ImageView cannot be cast to uk.co.senab.photoview.PhotoView

    Root Cause Analysis

    1. java.lang.ClassCastException

      android.widget.ImageView cannot be cast to uk.co.senab.photoview.PhotoView

      at com.wenming.weiswift.ui.login.fragment.home.userdetail.adapter.UserPhotoAdapter$ViewHolder.<init>()
    2. com.wenming.weiswift
      HeaderAndFooterRecyclerViewAdapter.onCreateViewHolder
      1. com.wenming.weiswift.ui.login.fragment.home.userdetail.adapter.UserPhotoAdapter$ViewHolder.<init>(UserPhotoAdapter.java:79)
      2. com.wenming.weiswift.ui.login.fragment.home.userdetail.adapter.UserPhotoAdapter.onCreateViewHolder(UserPhotoAdapter.java:46)
      3. com.wenming.weiswift.ui.login.fragment.home.userdetail.adapter.UserPhotoAdapter.onCreateViewHolder(UserPhotoAdapter.java:23)
      4. com.wenming.weiswift.widget.endlessrecyclerview.HeaderAndFooterRecyclerViewAdapter.onCreateViewHolder(HeaderAndFooterRecyclerViewAdapter.java:165)
      4 frames
    3. Android v7
      RecyclerView.onLayout
      1. android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5464)
      2. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4689)
      3. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4599)
      4. android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1988)
      5. android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:528)
      6. android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1347)
      7. android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:574)
      8. android.support.v7.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)
      9. android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3003)
      10. android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2881)
      11. android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3265)
      11 frames
    4. Android Platform
      ViewGroup.layout
      1. android.view.View.layout(View.java:15656)
      2. android.view.ViewGroup.layout(ViewGroup.java:4857)
      2 frames
    5. Android Support v4
      SwipeRefreshLayout.onLayout
      1. android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:596)
      1 frame
    6. Android Platform
      ViewGroup.layout
      1. android.view.View.layout(View.java:15656)
      2. android.view.ViewGroup.layout(ViewGroup.java:4857)
      3. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
      4. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)
      5. android.widget.LinearLayout.onLayout(LinearLayout.java:1440)
      6. android.view.View.layout(View.java:15656)
      7. android.view.ViewGroup.layout(ViewGroup.java:4857)
      8. android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
      9. android.widget.FrameLayout.onLayout(FrameLayout.java:388)
      10. android.view.View.layout(View.java:15656)
      11. android.view.ViewGroup.layout(ViewGroup.java:4857)
      12. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)
      13. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)
      14. android.widget.LinearLayout.onLayout(LinearLayout.java:1440)
      15. android.view.View.layout(View.java:15656)
      16. android.view.ViewGroup.layout(ViewGroup.java:4857)
      16 frames
    7. com.wenming.swipebacklayout
      SwipeBackLayout.onLayout
      1. com.wenming.swipebacklayout.SwipeBackLayout.onLayout(SwipeBackLayout.java:402)
      1 frame
    8. Android Platform
      ActivityThread.main
      1. android.view.View.layout(View.java:15656)
      2. android.view.ViewGroup.layout(ViewGroup.java:4857)
      3. android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
      4. android.widget.FrameLayout.onLayout(FrameLayout.java:388)
      5. android.view.View.layout(View.java:15656)
      6. android.view.ViewGroup.layout(ViewGroup.java:4857)
      7. android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2288)
      8. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2008)
      9. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1238)
      10. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6473)
      11. android.view.Choreographer$CallbackRecord.run(Choreographer.java:803)
      12. android.view.Choreographer.doCallbacks(Choreographer.java:603)
      13. android.view.Choreographer.doFrame(Choreographer.java:573)
      14. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789)
      15. android.os.Handler.handleCallback(Handler.java:733)
      16. android.os.Handler.dispatchMessage(Handler.java:95)
      17. android.os.Looper.loop(Looper.java:157)
      18. android.app.ActivityThread.main(ActivityThread.java:5356)
      18 frames
    9. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:515)
      2 frames
    10. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
      2 frames
    11. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame