cannot find android support library

本秂侑毒 提交于 2020-01-16 19:35:07

问题


please notice that i searched a lot so this is not a duplicated question

searched these with no answer

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

i just want to be able to use TabLayout as when i use it it says cannot resolve 'TabLayout' symbol.

and when i try to import it

import android.support.design.widget.TabLayout; says also cannot resolve 'TabLayout'

also i searched for that error and it results to install the android support library which i cannot find

here is a search for that Android Studio cannot resolve symbol 'TabLayout'

so how to install that library ?!!

Image of SDK

here is the 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'
}

Thanks in advance ....


回答1:


Make sure you have added the dependency:

compile 'com.android.support:design:23.1.1'

Then import:

import android.support.design.widget.TabLayout;


来源:https://stackoverflow.com/questions/38341305/cannot-find-android-support-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!