1

Here is the snippet of main.xml.Although android:layout_width is used its giving attribute is missing.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical" 
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    <TextView android:id="@+id/eventlabel" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:layout_marginLeft="10px" 
        android:layout_weight="1" 
        android:paddingBottom="10px"/>
</LinearLayout>

Could someone point out the mistake?Thanks

4

2 回答 2

5

你有:

<LinearLayout xmlns="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools

将其更改为:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    <!-- rest is the same -->

您只有xmlns=...并且实际上没有指定android它的一部分。此外,您的toolsXMLNS 缺少关闭"

于 2013-04-26T13:40:46.480 回答
0

尝试清理您的解决方案,然后重新构建它。

于 2013-04-26T13:39:36.250 回答