Сбой приложения при прокрутке андроида

Я реализовал RecyclerView в своем фрагменте, который показывает три разных типа данных. Он отображается правильно при запуске, но после прокрутки двух элементов приложения аварий. Ниже приведен журнал ошибок из logact вместе с моим build.gradle:

defaultConfig {
    applicationId 'com.app.yaw'
    minSdkVersion 16
    compileSdkVersion 23
    buildToolsVersion "23.0.3"
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
    multiDexEnabled true

}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile ('com.facebook.android:facebook-android-sdk:4.8.0'){
    exclude module: 'support-v4'
}
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.google.code.gson:gson:2.6.2'
compile('com.twitter.sdk.android:twitter:2.0.0@aar') {
    transitive = true;
}
compile 'com.android.support:recyclerview-v7:+'
}

Ошибка:

FATAL EXCEPTION: main
                                                       Process: com.app.yaw, PID: 4842
                                                       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.app.yaw/files/instant-run/dex/slice-com.android.support-support-v4-23.1.1_f0d40c0c98a4f0392163431bacae3584a7d8e5f6-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.scrollByInternal(RecyclerView.java:1596)
                                                           at android.support.v7.widget.RecyclerView.onTouchEvent(RecyclerView.java:2704)
                                                           at android.view.View.dispatchTouchEvent(View.java:8287)
                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2318)
                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2050)
                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2324)
                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2064)
                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2324)
                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2064)
                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2324)
                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2064)
                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2324)
                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2064)
                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2324)
                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2064)
                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2324)
                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2064)
                                                           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2324)
                                                           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2064)
                                                           at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2327)
                                                           at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1705)
                                                           at android.app.Activity.dispatchTouchEvent(Activity.java:2797)
                                                           at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2288)
                                                           at android.view.View.dispatchPointerEvent(View.java:8477)
                                                           at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4281)
                                                           at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4147)
                                                           at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3652)
                                                           at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3705)
                                                           at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3671)
                                                           at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3781)
                                                           at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3679)
                                                           at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3838)
                                                           at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3652)
                                                           at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3705)
                                                           at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3671)
                                                           at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3679)
                                                           at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3652)
                                                           at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5961)
                                                        at android.view.ViewRootImpl.doProcessInputEve

android,android-recyclerview,

0

Ответов: 1


1

У меня была одна и та же проблема, я решил решить проблему, изменив зависимости в файле Project / gradle / build.gradle. Для меня проблема заключалась в том, что версия appcompat была ниже, чем просмотры recycler. Я просто изменил версию recyclers, чтобы соответствовать appcompat. Снимок экрана о том, что и где

Надеюсь, это поможет Томми

андроид, андроид-recyclerview,
Похожие вопросы