I trying to edit my xml file but android studio cannot seems to find android.support.design.widget.TabLayout
3 Answers
Add dependencies inside your build.gradle file:
dependencies {
// add this dependencies
compile 'com.android.support:design:23.1.1'
}
2 Comments
kaikai
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 ?
Nitin Karande
Can you paste your logcat and build.gradle Dependencies?
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
Sorry! I placed the compile code under project where it should be module! Apologize ! and thank you for your help! hehe
2 Comments
Gabriel Fair
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.
kaikai
yeap okie sure understood