首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

【求解惑】ERROR Error parsing XML: unbound prefix,该怎么解决

2012-03-28 
【求解惑】ERROR Error parsing XML: unbound prefix?xml version1.0 encodingutf-8?LinearLayout

【求解惑】ERROR Error parsing XML: unbound prefix
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
<Button Android:id="@+id/button0"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:text="abc" />
</LinearLayout>

本人初学者,以上是我的一个main.xml文件,不知道为什么总是有下面的错误提示:
- ERROR Error parsing XML: unbound prefix
- The prefix "Android" for attribute "Android:id" associated with an element type "Button" is not bound.

哪位大虾们指点一下~

[解决办法]

XML code
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  android:orientation="vertical"  android:layout_width="fill_parent"  android:layout_height="fill_parent">//此处少了“>”<Button android:id="@+id/button0"//小写怕android  android:layout_width="fill_parent"  android:layout_height="wrap_content"  android:text="abc" /></LinearLayout> 

热点排行