标签:
出现这个问题一般是因为未引用库,解决方法如下:
1、在app/build.gradle下
dependencies { compile fileTree(dir: ‘libs‘, include: [‘*.jar‘]) compile ‘com.android.support:appcompat-v7:your_api_version_number.0.0‘//相应版本 compile ‘com.android.support:design:+‘//相应版本 }
然后Build->Clean Project
2、在项目根build.gradle下
ext { compileSdkVersion = 23 buildToolsVersion = "23.0.1"//相应版本 supportLibVersion = "23.0.1"//相应版本 }
然后:工具栏中sync project with gralde file
Android Studio cannot resolve symbol 'TabLayout'
标签:
原文地址:http://www.cnblogs.com/goodpan/p/5448986.html