2011-06-16 62 views
0

我的环境是 蚀:3.2 安卓2.3错误main.xml中的文件:错误解析XML:绑定前缀

<?xml version="1.0" encoding="utf-8"?> 

<LinearLayout 
    android:id="@+id/linearLayout2" 
    android:layout_width="fill_parent" 
    android:isScrollContainer="true" 
    android:keepScreenOn="true" 
    android:layout_height="wrap_content" 
    android:orientation="vertical"> 
<TextView 
    android:text="The Company" 
    android:layout_height="wrap_content" 
    android:layout_weight="1" 
    style="@layout/main" 
    android:layout_width="wrap_content" 
    android:textSize="40dip" 
    android:id="@+id/textView1" 
    android:layout_gravity="center_horizontal" 
    android:paddingTop="30dip"></TextView> 
    <TextView 
    android:text="Shopping Lists" 
    android:layout_height="wrap_content" 
    android:layout_marginTop="40px" 
    android:layout_width="wrap_content" 
    android:textSize="25dip" 
    android:id="@+id/textView2" 
    android:layout_gravity="center_horizontal"></TextView> 
<FrameLayout 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_x="40px" 
     android:layout_y="35px"> 
<ScrollView 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/widget54" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 

<ListView 
     android:id="@android:id/list" 
     android:orientation="vertical" 
     android:layout_width="wrap_content" 
     android:layout_weight="15.0" android:layout_height="fill_parent"/> 
     </ScrollView> 
     </FrameLayout> 
    <LinearLayout 
     android:layout_height="wrap_content" 
     android:id="@+id/linearLayout1" 
     android:layout_width="match_parent"> 
    <Button 
     android:text="New Project" 
     android:layout_height="wrap_content" 
     android:layout_width="wrap_content" 
     android:id="@+id/button1" 
     android:textColorHighlight="#ff0000"> 
     </Button> 
     <Button 
     android:text="Manage Projects" 
     android:layout_height="wrap_content" 
     android:layout_width="wrap_content" 
     android:id="@+id/button2"> 
     </Button> 
     <Button 
     android:text="Done" 
     android:layout_height="wrap_content" 
     android:layout_width="wrap_content" 
     android:id="@+id/button3"> 
     </Button> 
    </LinearLayout> 
</LinearLayout> 
+0

把你的xml完全 – ngesh 2011-06-16 12:46:02

回答

0

每个xml文件都需要有一个名称空间,它使用xmlns在xml文件的根标记中定义。因此,woodshy的建议正是您需要的,请在您的xml文件的第一个LinearLayout中添加:xmlns:android="http://schemas.android.com/apk/res/android

1

添加的xmlns:安卓=“http://schemas.android.com/ apk/res/android“为根LinearLayout

相关问题