Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio cannot resolve symbol 'TabLayout'

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

like image 698
Jeffin Manuel Avatar asked Sep 21 '15 02:09

Jeffin Manuel


2 Answers

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:+'
}
like image 150
user481610 Avatar answered Oct 15 '22 23:10

user481610


I solved the issue Manually by adding the following two lines:

implementation 'com.android.support:support-v4:22.2.0'
implementation 'com.android.support:design:22.2.0'

under dependencies in \app\build.gradle worked for me.

Note: Your all the support libraries have to be the same version i.e. appcompat-v7 and support-v4 to same version e.g. 23.0.1; otherwise you can get this error

java.lang.NoClassDefFoundError: android.support.v7.internal.widget.TintManager` after code build

like image 9
Shirish Herwade Avatar answered Oct 15 '22 23:10

Shirish Herwade