原文地址http://blog.csdn.net/taxuexumei/article/details/41523419

今天遇到的问题,,,保存到博客里,下回遇到找博客就行了,,,,,,

今天在制作安卓UI嵌套式布局的时候,当出入以下的的代码的时候出现以下情况:
<LinearLayout
    xmlns:android="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"
    tools:context="${relativePackage}.${activityClass}" >

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="北京魔乐科技" />
    <LinearLayout
        【xmlns:android="http://schemas.android.com/apk/res/android"】
        android:orientation="vertical"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content" >
        <ImageView 
            android:src="@drawable/ic_launcher"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"/>
        <ImageView 
            android:src="@drawable/ic_launcher"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"/>
    </LinearLayout>
    <TableLayout 
        【xmlns:android="http://schemas.android.com/apk/res/android"】
        android:orientation="vertical"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content" >
        
    </TableLayout>

</LinearLayout>
【】此括号内标记的东西出现红色下划线。
出现了以下
Unexpected namespace prefix "xmlns" found for tag LinearLayout
的错误,我的解决方法是

是一个namespace声明只要在xml中出现一次就可以了,多次出现就报错,以前好像没这要求。
只保留第一个声明,后面的直接删除就OK了。

//////////////////////////

有一次升级开发工具后发现xml脚本出现错误“Unexpected namespace prefix "xmlns" found for tag LinearLayout”,原来是一个namespace声明只要在xml中出现一次就可以了,多次出现就报错,以前好像没这要求。

只保留第一个声明,后面的直接删除就OK了。

Unexpected namespace prefix "xmlns" found for tag Linear Layout的更多相关文章

  1. 错误“Unexpected namespace prefix "xmlns" found for tag LinearLayout”的解决方法(转)

    (转自:http://blog.csdn.net/bombzhang/article/details/12676789) 有一次升级开发工具后发现xml脚本出现错误“Unexpected namesp ...

  2. 错误“Unexpected namespace prefix "xmlns" found for tag LinearLayout”的解决方法

    编写布局代码时发现xml脚本出现错误“Unexpected namespace prefix "xmlns" found for tag LinearLayout”,原来是一个na ...

  3. android常见错误-Unexpected namespace prefix "xmlns" found for tag LinearLayout

    有一次升级android开发工具后发现xml脚本出现错误“Unexpected namespace prefix "xmlns" found for tag LinearLayou ...

  4. error:“Unexpected namespace prefix "xmlns" found for tag LinearLayout”

    错误“Unexpected namespace prefix "xmlns" found for tag LinearLayout”的解决方法 androidUnexpected ...

  5. 【解决方法】Unexpected namespace prefix “xmlns” found for tag Layout

    问题描写叙述 出错代码例如以下: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android&quo ...

  6. [Android开发常见问题-14] Unexpected namespace prefix "abc" found for tag SomeThing

    很多开发者朋友可能会自己定义一些控件,以此来扩展现有控件的功能,在扩展空间的时候通常会自己定义一些属性,例如: [html]  view plain copy   <android.alex.v ...

  7. Customize WCF Envelope and Namespace Prefix

    转自:http://vanacosmin.ro/Articles/Read/WCFEnvelopeNamespacePrefix Posted on January 8th 2014 by Vana ...

  8. SVG报错error on line 39 at column 26: Namespace prefix xlink for href on script is not defined

    转自:http://stackoverflow.com/questions/3561270/error-on-line-39-at-column-26-namespace-prefix-xlink-f ...

  9. org.dom4j.IllegalAddException: No such namespace prefix: *** is in scope on: org.dom4j.tree.DefaultElement (dom4j写入XML文件,标签中带【:】(冒号)解决办法)

    用dom4j操作写XML文件,标签中含有冒号,会报 org.dom4j.IllegalAddException: No such namespace prefix: *** is in scope o ...

随机推荐

  1. The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,reflectorFactory?,plugins?,environments?,databaseIdProv

    在mybatis配置文件config.xml中报错: The content of element type "configuration" must match "(p ...

  2. cadence学习之原理图——连线

    重点: (1)两种连接方式:Place Net和Place Net Alias (2)交叉线之间的电气连接Place Junction (3)引脚悬空 Place no connect (4)两器件管 ...

  3. 奔小康赚大钱 hdu 2255( KM )

    http://acm.split.hdu.edu.cn/showproblem.php?pid=2255 带权匹配问题: #include <stdio.h> #include <a ...

  4. SVN服务器安装

    CentOS 6.5 SVN搭建 (YUM安装)   参考文献:http://www.linuxidc.com/Linux/2013-10/91903.htm 安装说明 安装了一下SVN服务器,过程如 ...

  5. Java web 之表单验证

    按照软件工程师的定位来讲,表单验证应该要好好练习的 html  javascript

  6. CentOS7搭建NAS,包括NFS、ISCSI

    第一步:安装 更新系统 yum update 安装iftop yum install epel-release yum install iftop 安装NFS yum install nfs-util ...

  7. python学习之路-day3

    本节内容 1.集合操作 2.文件操作 3.字符编码与转码 4.函数 ==================================== 一.集合操作 集合是一个无序的,不重复的数据组合,它的主要 ...

  8. Navicat for Oracle 连接oracle 配置

    oci.dll  替换为对应oracle版本的oci.dll

  9. C++通过模板实现多态

    #include <iostream> using namespace std; template<typename T> class Phone { public: void ...

  10. JS实现滑动门效果

    html部分 p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 31.0px Consolas; color: #2b7ec3 } p.p2 { margin ...