在Eclipse中进行Android项目开发,需要在布局文件中用到TabLayout时无法使用app
下面是我的源码,并且在libs中添加了android-support-design.jar包
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<android.support.design.widget.TabLayout
android:id="@+id/id_tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffffff"
app:tabGravity="fill"
app:tabIndicatorColor="@color/main_color"
app:tabMode="fixed"
app:tabSelectedTextColor="@color/main_color"
app:tabTextColor="#000000" />
<android.support.v4.view.ViewPager
android:id="@+id/id_viewPager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
总是会提示error: No resource identifier found for attribute 'tabGravity' in package 'com.example.festival_sms'
请问应该怎么解决?