找不到与给定名称匹配的资源(在'paddingBottom'处,值为'@ dimen/activity_vertical_margin') [英] No resource found that matches the given name (at 'paddingBottom' with value '@dimen/ activity_vertical_margin')

查看:454
本文介绍了找不到与给定名称匹配的资源(在'paddingBottom'处,值为'@ dimen/activity_vertical_margin')的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图构建一个导航抽屉,从某些网站复制了代码,并且在其中一种XML中遇到了此错误.

I was trying to build a navigation drawer for which I copied code from some website and I am getting this error in one of the XMLs.

未找到与给定名称匹配的资源(在'paddingBottom'处值为'@ dimen/activity_vertical_margin')

No resource found that matches the given name (at 'paddingBottom' with value '@dimen/ activity_vertical_margin')

如何摆脱这个错误?

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".TabbedActivity$DummySectionFragment" >

    <TextView
        android:id="@+id/section_label"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</RelativeLayout>

推荐答案

请确保您也复制了 dimens.xml 文件.

Make sure you copied the dimens.xml file too.

这篇关于找不到与给定名称匹配的资源(在'paddingBottom'处,值为'@ dimen/activity_vertical_margin')的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆