您的位置:首页 > 移动开发 > Android开发

关于Recyclerview使用时的一个错误java.lang.NoSuchMethodError: No static method getMatrix(Landroid/view/View;)

2016-10-14 12:37 615 查看
java.lang.NoSuchMethodError: No static method getMatrix(Landroid/view/View;)Landroid/graphics/Matrix; in class Landroid/support/v4/view/ViewCompat; or its super classes (declaration of 'android.support.v4.view.ViewCompat' appears in /data/data/com.liu.glidedemo/files/instant-run/dex/slice-com.android.support-support-v4-23.4.0_a61901505d5554d4b0d61f04dd34330cf171e4ee-classes.dex)
at android.support.v7.widget.RecyclerView$LayoutManager.getTransformedBoundingBox(RecyclerView.java:8100)
at android.support.v7.widget.OrientationHelper$2.getTransformedEndWithDecoration(OrientationHelper.java:402)
at android.support.v7.widget.LinearLayoutManager.recycleViewsFromStart(LinearLayoutManager.java:1275)
at android.support.v7.widget.LinearLayoutManager.recycleByLayoutState(LinearLayoutManager.java:1347)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1371)
at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1193)
at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1043)
at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4413)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:886)
at android.view.Choreographer.doCallbacks(Choreographer.java:698)
at android.view.Choreographer.doFrame(Choreographer.java:630)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:872)
at android.os.Handler.handleCallback(Handler.java:743)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:150)
at android.app.ActivityThread.main(ActivityThread.java:5643)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:799)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:689)


搜索半天都没有看到一样的错误原因,今天看到一个说support.v7:RecyclerView的版本要和support.v7:appcompat一样

看自己的project structure,发现不一致,一个是24.2.0,另一个是23.几,然后改成一样的瞬间解决
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android recyclview
相关文章推荐