在'android'包中找不到属性'layout_width'的资源标识符

时间:2012-11-16 19:18:06

标签: eclipse

我在日食中遇到错误:

  

根元素后面的文档中的标记必须格式正确在'android'包中找不到属性'layout_width'的资源标识符

此错误发生在activy_main.xml。来自activy_main.xml的所有代码:

1 个答案:

答案 0 :(得分:0)

问题在于您的相对布局,并且您已在其中输入了一个按钮的ID,然后将其关闭... 只需把它放在你早先的相对布局上,然后告诉我它是否有效

<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#000000">
相关问题