最近、Android Studio 2.3にアップグレードされましたが、getAdapterPosition(RecyclerView)が見つかりませんでした。ウェブ上では、その理由はサポートライブラリのバージョンであることがわかりました。しかし、私はまだそれを解決する方法がわかりません。私のサポート:appcompat-v7:25.2.0 'のバージョンが最新です(たとえば、21以上)。私はなぜ方法が見つからないのか分からない。アドバイスをお願いしますか?getAdapterPosition()がメソッドとして見つかりません
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'
})
compile files('libs/wekaSTRIPPED.jar')
compile('com.mikepenz:materialdrawer:[email protected]') { // Material Drawer
transitive = true
}
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.google.dagger:dagger:2.9'
compile 'com.github.wendykierp:JTransforms:3.1'
compile 'com.afollestad.material-dialogs:commons:0.9.3.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.github.paolorotolo:appintro:4.1.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.borax12.materialdaterangepicker:library:1.9'
compile 'com.evernote:android-job:1.1.7' // Scheduling library
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.9'
getLayoutPositionを(拡張クラス内のこのメソッドを使用していることを確認する必要があり
)は、アイテムの位置を取得するためのより良いオプションです。あなたが解決策を見つけられない場合、これを使用しようとすることができます –