错误:找不到符号类RecyclerView

Mah*_*dav 7 java android android-recyclerview

android {
    compileSdkVersion 23
    buildToolsVersion "22.0.1"
    defaultConfig {
        applicationId "com.hiii"
        minSdkVersion 11
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('libs/bolts-android-1.2.1 - Copy.jar')
    compile 'com.android.support:appcompat-v7:23.0.0'
   }
Run Code Online (Sandbox Code Playgroud)

我不能使用RecyclerView和Linearlayoutmanager.我已经尝试编译旧版本,但每次出现错误都无法解析symbol'recyclerview'.please帮帮我

Mat*_*ini 24

您还需要添加v7 recyclerview库.将此添加到您的依赖项build.gradle:

compile 'com.android.support:recyclerview-v7:23.0.0'
Run Code Online (Sandbox Code Playgroud)