Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by wenmingvs
, 1 year ago
android.widget.ImageView cannot be cast to uk.co.senab.photoview.PhotoView
via GitHub by wenmingvs
, 1 year ago
android.widget.ImageView cannot be cast to uk.co.senab.photoview.PhotoView
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.(UserPhotoAdapter.java:79)	at com.wenming.weiswift.ui.login.fragment.home.userdetail.adapter.UserPhotoAdapter.onCreateViewHolder(UserPhotoAdapter.java:46)	at com.wenming.weiswift.ui.login.fragment.home.userdetail.adapter.UserPhotoAdapter.onCreateViewHolder(UserPhotoAdapter.java:23)	at com.wenming.weiswift.widget.endlessrecyclerview.HeaderAndFooterRecyclerViewAdapter.onCreateViewHolder(HeaderAndFooterRecyclerViewAdapter.java:165)	at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:5464)	at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4689)	at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4599)	at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1988)	at android.support.v7.widget.GridLayoutManager.layoutChunk(GridLayoutManager.java:528)	at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1347)	at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:574)	at android.support.v7.widget.GridLayoutManager.onLayoutChildren(GridLayoutManager.java:170)	at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3003)	at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2881)	at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3265)	at android.view.View.layout(View.java:15656)	at android.view.ViewGroup.layout(ViewGroup.java:4857)	at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:596)	at android.view.View.layout(View.java:15656)	at android.view.ViewGroup.layout(ViewGroup.java:4857)	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)	at android.widget.LinearLayout.onLayout(LinearLayout.java:1440)	at android.view.View.layout(View.java:15656)	at android.view.ViewGroup.layout(ViewGroup.java:4857)	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)	at android.widget.FrameLayout.onLayout(FrameLayout.java:388)	at android.view.View.layout(View.java:15656)	at android.view.ViewGroup.layout(ViewGroup.java:4857)	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1677)	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1531)	at android.widget.LinearLayout.onLayout(LinearLayout.java:1440)	at android.view.View.layout(View.java:15656)	at android.view.ViewGroup.layout(ViewGroup.java:4857)	at com.wenming.swipebacklayout.SwipeBackLayout.onLayout(SwipeBackLayout.java:402)	at android.view.View.layout(View.java:15656)	at android.view.ViewGroup.layout(ViewGroup.java:4857)	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)	at android.widget.FrameLayout.onLayout(FrameLayout.java:388)	at android.view.View.layout(View.java:15656)	at android.view.ViewGroup.layout(ViewGroup.java:4857)	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2288)	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2008)	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1238)	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6473)	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803)	at android.view.Choreographer.doCallbacks(Choreographer.java:603)	at android.view.Choreographer.doFrame(Choreographer.java:573)	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789)	at android.os.Handler.handleCallback(Handler.java:733)	at android.os.Handler.dispatchMessage(Handler.java:95)	at android.os.Looper.loop(Looper.java:157)	at android.app.ActivityThread.main(ActivityThread.java:5356)	at java.lang.reflect.Method.invokeNative(Native Method)	at java.lang.reflect.Method.invoke(Method.java:515)	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)	at dalvik.system.NativeStart.main(Native Method)