0

I trying to edit my xml file but android studio cannot seems to find android.support.design.widget.TabLayout

1
  • did you add com.android.support:design: lib in your gradle file? Commented Nov 17, 2016 at 4:11

3 Answers 3

2

Add dependencies inside your build.gradle file:

 dependencies {
    // add this dependencies
    compile 'com.android.support:design:23.1.1'
 }
Sign up to request clarification or add additional context in comments.

2 Comments

Yes i did, but it told me could not find method compile() for argument And just to double confirm under which gradle i suppose to add in ?
Can you paste your logcat and build.gradle Dependencies?
2

to fix this in Android Studio (AS) Build->Clean Project . 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:+'
}

Comments

0

Sorry! I placed the compile code under project where it should be module! Apologize ! and thank you for your help! hehe

2 Comments

Hello. This is a friendly comment to let you know why I downvoted your answer. It is not an answer and should be typed as a comment instead.
yeap okie sure understood

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.