<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        />
    <Button        andriod:layout_width="fill_parent"
        andriod:layout_height="wrap_content"
        /></LinearLayo
红字处为什么会报错

解决方案 »

  1.   

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" >  <TextView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      />
      <Button 
      andriod:layout_width="fill_parent"
      andriod:layout_height="wrap_content"
      /></LinearLayo 
    这样的
      

  2.   

    <Button  
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      />
      

  3.   

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent"
       android:orientation="vertical" >   <TextView
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       />
       <Button  
      android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       /></LinearLayout>
      

  4.   

    andriod:layout_width
    写错了,应该是,是roid,不是riod
    android:layout_width