0

I'm sorry if I'm missing something obvious here, but I migrated my project to android X and still cannot use TabLayout in my layout files.

My dependencies in build.grade (app level):

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.core:core-ktx:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

    implementation 'com.google.firebase:firebase-analytics:17.2.0'
    implementation 'com.google.firebase:firebase-database:19.2.0'
    implementation 'com.google.firebase:firebase-storage:19.1.0'
    implementation 'com.google.firebase:firebase-auth:19.2.0'


    implementation 'com.airbnb.android:lottie:3.3.1'

    implementation 'com.lorentzos.swipecards:library:1.0.9'


    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

I also tried to add:

implementation 'com.android.support:design:27.1.0'

And then Android studio marks it as error and tells me to upgrade to Android X (which I did already)

If it matters, my compile sdk version is 29 build tools: 29.0.2

Thanks in advance

1 Answer 1

2

use implementation 'com.google.android.material:material:1.0.0'. It includes Tablayout

Sign up to request clarification or add additional context in comments.

3 Comments

Oh thanks, you know I tried it before and it didn't work, apparently it does work after you exit and re-open android studio, syncing alone doesn't help... Thanks!
Next time. You can invalidate cache and restart. it will help you.
Thanks Rahul I will

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.