Android Studio cannot resolve symbol 'TabLayout'

Jeffin Manuel picture Jeffin Manuel · Sep 21, 2015 · Viewed 31.1k times · Source

Cannot resolve symbol TabLayout ? How to clear this error? Please help me. I already imported import android.support.design.widget.TabLayout;

Answer

user481610 picture user481610 · Sep 26, 2015

Had a similar problem, to fix this in Android Studio (AS) I went Build->Clean Project and AS sorted everything out. Make sure in your build.gradle file under dependencies that you have:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:your_api_version_number.0.0'
    compile 'com.android.support:design:+'
}