【问题标题】:Error:(4, 28) No resource found that matches the given name (at 'layout_height' with value '@dimen/nav_header_height')错误:(4, 28) 未找到与给定名称匹配的资源(位于“layout_height”,值为“@dimen/nav_header_height”)
【发布时间】:2016-09-05 05:29:42
【问题描述】:

在这里我附上了我的程序。在这个程序 2 中 有错误。我不知道如何清除这些错误...

<android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/AppTheme.AppBarOverlay"/>

    <android.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        app:popupTheme="@style/AlertDialog.AppCompat.Light" >

<include layout="@layout/content_main" />

<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|end"
    android:layout_margin="@dimen/activity_horizontal_margin"
    android:src="@android:drawable/ic_dialog_email" />

【问题讨论】:

标签: android android-studio


【解决方案1】:

将以下行添加到“res/values/dimens.xml”文件中-

 <dimen name="nav_header_height">50dp</dimen>

【讨论】:

    猜你喜欢
    • 2015-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-18
    • 1970-01-01
    • 1970-01-01
    • 2016-09-18
    • 1970-01-01
    相关资源
    最近更新 更多