Reputation: 370
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.
import android.support.v7.appcompat.R;
instead of android.R
and getting following several error like Widget_Design_TabLayout cannot be resolved or is not a field
TabLayout_tabIndicatorHeight cannot be resolved or is not a field
TabLayout_tabIndicatorColor cannot be resolved or is not a field
etc. Please suggest.Upvotes: 0
Views: 1773
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