2

I want to create a TabLayout with ViewPager. I'm using api version 22. I'm getting this error

TabLayout cannot be resolved to a type

I'm using Eclipse for development.

SDK manager

Community
  • 1
  • 1
Jas
  • 3,207
  • 2
  • 15
  • 45

1 Answers1

2

You were remaining with adding support library in your project.

Before use the design support library, you have to import support-v7-appcompat library from android-sdks\extras\android\support\v7\appcompat. Then, you have to:

  • create an android library project in eclipse for design support library
  • put the contents of directory android-sdks\extras\android\support\design in the design support library project
  • Link appcompat-v7 library to design support library project
  • Link support library project from your project.

You can not use directly the jar android-support-design.jar because you need some resources too (this is the reason of aar format).

For more info just check Error in styles_base.xml file - android app - No resource found that matches the given name 'android:Widget.Material.ActionButton'

Community
  • 1
  • 1
Chintan Soni
  • 24,761
  • 25
  • 106
  • 174