我在我的项目中使用了recyclerview。该项目使用以下库:
com.android.support:appcompat-v7:23.4.0
com.android.support:design:23.0.0
com.android.support:support-v4:23.4.0
recyclerview
正常运作,例如滚动。我决定更新我的项目以使用相同库的v7:25.0.0
,以便将DiffUtil
类用于与我的recyclerview
关联的适配器。一旦我使用更新的库构建并运行项目,我的recyclerview
就不再滚动了。我还没有整合DiffUtil
课程,所以我知道这不是问题所在。它似乎与更新的库有关,因为回到之前的库,使我的recyclerview
再次滚动。非常感谢您的帮助。
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
// replace with the current version of the Android plugin
classpath 'com.android.tools.build:gradle:2.3.3'
// the latest version of the android-apt plugin
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.6'
classpath 'com.google.gms:google-services:3.0.0'
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url "http://dl.bintray.com/tbruyelle/tbruyelle" }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
applicationId 'com.example.exam'
minSdkVersion 15
targetSdkVersion 23
versionCode 29
versionName "1.3.8"
multiDexEnabled true
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
abortOnError false
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
final STETHO = '1.4.1'
compile "com.facebook.stetho:stetho:$STETHO"
compile files('libs/classes.jar')
compile('io.branch.sdk.android:library:2.+') {
exclude module: 'answers-shim'
}
compile files('libs/Parse-1.10.1.jar')
compile files('libs/ParseFacebookUtilsV4-1.10.1.jar')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.6@aar') {
transitive = true;
}
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.flaviofaria:kenburnsview:1.0.6'
compile 'com.github.android-s14:rve:1.1.4'
testCompile 'junit:junit:4.12'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.flaviofaria:kenburnsview:1.0.6'
compile 'com.github.android-s14:rve:1.1.4'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.eftimoff:android-pathview:1.0.6@aar'
compile 'com.github.jorgecastilloprz:fillableloaders:1.02@aar'
compile 'info.hoang8f:android-segmented:1.0.5'
compile 'com.pnikosis:materialish-progress:1.5'
compile 'me.relex:circleindicator:1.1.5@aar'
compile 'com.akexorcist:RoundCornerProgressBar:2.0.3'
compile 'com.google.code.gson:gson:2.3.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'com.raizlabs.android:DBFlow-Core:2.2.1'
compile 'com.raizlabs.android:DBFlow:2.2.1'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1@aar'
compile 'com.daimajia.androidanimations:library:1.1.3@aar'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
compile 'com.android.support:design:25.0.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.tealium:library:5.0.4'
compile 'com.google.firebase:firebase-messaging:10.2.6'
compile 'com.google.firebase:firebase-core:10.2.6'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:25.0.0'
testCompile 'junit:junit:4.12'
apt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
}
crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}