Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 427
Mahendra Yadav Avatar asked Oct 04 '15 16:10

Mahendra Yadav


1 Answers

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'
like image 159
Mattia Maestrini Avatar answered Oct 19 '22 15:10

Mattia Maestrini