Mahendra Yadav
Mahendra Yadav

Reputation: 83

Error:cannot find symbol class 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'
   }

I cannot use RecyclerView and Linearlayoutmanager .i have Tried to Compile the older version too but every time it comes with error Cannot resolve symbol'recyclerview'.please help me

Upvotes: 8

Views: 9611

Answers (1)

Mattia Maestrini
Mattia Maestrini

Reputation: 32780

You need to add also the v7 recyclerview library. Add this to the dependencies of your build.gradle:

compile 'com.android.support:recyclerview-v7:23.0.0'

Upvotes: 24

Related Questions