Android TableLayout-未找到属性的资源标识符

Android TableLayout-未找到属性的资源标识符,android,material-design,Android,Material Design,我正在使用新的android小部件包中引入的TabLayout,它是android.support.design.widget.TabLayout 昨天我的代码运行良好,现在我正在启动我的计算机并尝试重新构建项目,现在编译器先生说以下错误 Error:(22) No resource identifier found for attribute 'eleMode' in package 'android' Error:(22) No resource identifier found for a

我正在使用新的android小部件包中引入的
TabLayout
,它是android.support.design.widget.TabLayout

昨天我的代码运行良好,现在我正在启动我的计算机并尝试重新构建项目,现在编译器先生说以下错误

Error:(22) No resource identifier found for attribute 'eleMode' in package 'android'
Error:(22) No resource identifier found for attribute 'tabGrvation' in package 'android.com.hsc.yatra'
Error:(22) No resource identifier found for attribute 'tabavity' in package 'android.com.hsc.yatra'
请告诉我哪里不对?因此,我的编译器很高兴,然后编译项目

这是发生原始错误的XML

<android.support.design.widget.CoordinatorLayout 

    xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <android.support.design.widget.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

            <!--<android.support.v7.widget.Toolbar-->
            <!--android:id="@+id/toolbar"-->
            <!--android:layout_width="match_parent"-->
            <!--android:layout_height="?attr/actionBarSize"-->
            <!--android:background="?attr/colorPrimary"-->
            <!--app:layout_scrollFlags="scroll|enterAlways"-->
            <!--app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />-->
            <include layout="@layout/toolbar_searched_bus">

            </include>

            <android.support.design.widget.TabLayout
                android:id="@+id/tabs"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:eleMode="fixed"
                app:tabGrvation="2dp"
                app:tabavity="fill" />
        </android.support.design.widget.AppBarLayout>

        <android.support.v4.view.ViewPager
            android:id="@+id/viewpager"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />
    </android.support.design.widget.CoordinatorLayout>

xml属性中存在拼写错误。将属性更改为以下内容,然后重试

<android.support.design.widget.TabLayout
    android:id="@+id/tabs"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:elevation="2dp"
    app:tabMode="fixed"
    app:tabGravity="fill"/>

将支持库添加到您的build.gradle(模块:app)中,如下所示:

dependencies {
 compile 'com.android.support:design:24.+'
}

同样的错误,您也在使用
tabMode
&
tabGravity
编译器无法识别这些字段。解决方案是什么?你能提供吗?