1
我正嘗試使用LinearLayoutManager
中的方法findFirstVisibleItemPosition()
。 apis顯示此方法存在,但它不被自動完成識別和顯示。Android工作室不認識一種方法?
此佈局工作中的其他方法(至少部分)和android.support.v7.widget.LinearLayoutManager
已導入。
什麼可能是錯的?
編輯:here's我的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.skate.socialskate"
minSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:7.0.0'
compile 'com.android.support:cardview-v7:22.1.0'
compile 'com.android.support:recyclerview-v7:21.0.+'
compile 'com.android.support:support-v13:22.1.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
compile 'org.jsoup:jsoup:1.8.2'
}
向我們展示你的build.gradle文件。 – Eugene
請看這裏http://stackoverflow.com/questions/29327013/android-cannot-resolve-method-findfirstvisibleitemposition – Nabin
看起來像這只是在v7 – Nabin