error:Error parsing XML:unbound prefix

来源:互联网 发布:东华软件股份公司海安 编辑:程序博客网 时间:2024/06/05 16:08
<FrameLayout  
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"

    android:orientation="vertical" >

今天写这段XML的时候总是提示这个错误。

解决方法是:在FrameLayout后面加一段:xmlns:android="http://schemas.android.com/apk/res/android"

即改后代码如下:

<FrameLayout  xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"

    android:orientation="vertical" >

然后就不会出现这个错误了。

错误的意思是:无边界的前缀。xmlns字段可以限制这段代码的界限。

原创粉丝点击