请通知我搜索了很多,所以这不是一个重复的问题
搜索这些没有答案
Can't find Android Support Package
Cant' find Android Support package
How to add "Android Design Support Library" to Eclipse with ADT-plugin?
https://developer.android.com/topic/libraries/support-library/setup.html#using-apis
我只是想能够使用 TabLayout 就像我使用它时所说的那样 无法解决TabLayout'符号。
当我尝试导入它时
import android.support.design.widget.TabLayout; 说也无法解决TabLayout'
我也搜索了这个错误,结果安装了我找不到的android支持库
这是搜索它 Android Studio cannot resolve symbol 'TabLayout'
那么如何安装该库?!!
这里是gradle.build
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.example.android.engtomiwak"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
}
提前致谢....
答案 0 :(得分:2)
确保添加了依赖项:
compile 'com.android.support:design:23.1.1'
然后导入:
import android.support.design.widget.TabLayout;