Abhijit
Abhijit

Reputation: 370

Android TabLayout CompatTextView can not be resolved

I was using TabLayout, but after copying it in my src, I am getting following errors:

(1) android.support.v7.internal.widget.CompatTextView can not be resolved

(2) styleable cannot be resolved or is not a field Though I checked other answers in stackoverflow, but failed to get proper solution. I already imported android.R

(3) I checked that in my android-support-v7-appcompat.jar the class CompatTextView is missing. How this can be possible.

(4) Will there be any legal issue if I copy the TabLayout class given by google for my app? Please help.

Upvotes: 0

Views: 1773

Answers (1)

Paresh Mayani
Paresh Mayani

Reputation: 128428

Converting comments into the answer as you have found them helpful and able to resolve your issue.

I don't know why are you importing/copying it manually in your project, because TabLayout is part of design support library, you just need to include its artifact ID in your build.gradle file to access its classes and resources!

compile 'com.android.support:design:+' //replace + with latest version

Upvotes: 3

Related Questions