简体   繁体   English

TabLayout - 找不到属性的资源标识符

[英]TabLayout - No resource identifier found for attribute

I am using TabLayout which is introduced in new android widget package android.support.design.widget.TabLayout 我正在使用TabLayout ,这是在新的android小部件包android.support.design.widget.TabLayout引入的

Yesterday my code is working fine, now today I was start my computer and trying to re-build the project now Mr. Compiler is saying following error 昨天我的代码运行正常,现在我今天开始使用我的计算机,并尝试重新构建项目,现在Compiler先生说下面的错误

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'

Please guide me where I'm incorrect ? 请指导我哪里不对? So my compiler get happy and then compile the project. 所以我的编译器很开心,然后编译项目。

Here is my XML where original error was occured 这是我的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>

Add support library to your build.gradle (Module:app) as follows, 将支持库添加到build.gradle(Module:app) ,如下所示,

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

There are typos in the xml attributes. xml属性中存在拼写错误。 Change the attributes to the following and try. 将属性更改为以下内容并尝试。

<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"/>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到属性&#39;counterEnabled&#39;的资源标识符 - No resource identifier found for attribute 'counterEnabled' 找不到属性“ entryImages”的资源标识符 - No resource identifier found for attribute 'entryImages' 找不到属性“ facebook”的资源标识符 - No resource identifier found for attribute “facebook” 找不到属性“菜单”的资源标识符 - No Resource Identifier found for attribute 'menu' 错误:找不到属性“ showAsAction”的资源标识符 - error: No resource identifier found for attribute 'showAsAction' 在包“ android”中找不到属性“ linearLayoutOrientation”的资源标识符 - No resource identifier found for attribute 'linearLayoutOrientation' in package 'android' 在'android'包中找不到属性'paddingEnd'的资源标识符 - No resource identifier found for attribute 'paddingEnd' in Package 'android' 在&#39;android&#39;包中找不到属性&#39;accessibilityEventTypes&#39;的资源标识符 - No resource identifier found for attribute 'accessibilityEventTypes' in package 'android' 在包“ android”中找不到属性“ depurables”的资源标识符 - No resource identifier found for attribute 'depurables' in package 'android' 在包“ android”中找不到属性“ domain”的资源标识符 - No resource identifier found for attribute 'domain' in package 'android'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM