Cannot resolve symbol "RecycleView"

The problem basically is that when trying to RecyclerView in the class I get error "Can not resolve symbol" RecycleView "

This is my gradle code

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.android.support:recyclerview-v7:28.0.+'

This is my class

package com.example.admin.economizate;
     public class ViewHolder extends RecyclerView{
}

1 answer

  • answered 2018-10-11 19:01 cricket_007

    A ViewHolder should not extend a RecyclerView, but you need an import statement regardless

    You would want

    import android.support.v7.widget.RecyclerView.ViewHolder;
    
    public class YourViewHolder extends RecyclerView.ViewHolder {
    

    Note: You already have implementation 'com.android.support:recyclerview-v7:28.0.0', so remove the recyclerview-v7:28.0.+' line