Unexpected namespace prefix "xmlns" found for tag Linear Layout
原文地址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的更多相关文章
- 错误“Unexpected namespace prefix "xmlns" found for tag LinearLayout”的解决方法(转)
(转自:http://blog.csdn.net/bombzhang/article/details/12676789) 有一次升级开发工具后发现xml脚本出现错误“Unexpected namesp ...
- 错误“Unexpected namespace prefix "xmlns" found for tag LinearLayout”的解决方法
编写布局代码时发现xml脚本出现错误“Unexpected namespace prefix "xmlns" found for tag LinearLayout”,原来是一个na ...
- android常见错误-Unexpected namespace prefix "xmlns" found for tag LinearLayout
有一次升级android开发工具后发现xml脚本出现错误“Unexpected namespace prefix "xmlns" found for tag LinearLayou ...
- error:“Unexpected namespace prefix "xmlns" found for tag LinearLayout”
错误“Unexpected namespace prefix "xmlns" found for tag LinearLayout”的解决方法 androidUnexpected ...
- 【解决方法】Unexpected namespace prefix “xmlns” found for tag Layout
问题描写叙述 出错代码例如以下: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android&quo ...
- [Android开发常见问题-14] Unexpected namespace prefix "abc" found for tag SomeThing
很多开发者朋友可能会自己定义一些控件,以此来扩展现有控件的功能,在扩展空间的时候通常会自己定义一些属性,例如: [html] view plain copy <android.alex.v ...
- Customize WCF Envelope and Namespace Prefix
转自:http://vanacosmin.ro/Articles/Read/WCFEnvelopeNamespacePrefix Posted on January 8th 2014 by Vana ...
- 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 ...
- 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 ...
随机推荐
- URL Quoting
[URL Quoting] The URL quoting functions focus on taking program data and making it safe for use as U ...
- java文件乱码
要让一个 Java 源文件打开时编码格式为 UTF-8,需要做2件事情:1)设置Java 源文件的默认编码格式为UTF-8:2)设置workspace的编码格式为UTF-8. 相应设置如下: 设置 J ...
- quartus ii13.0~16.0 调用uedit (转载http://blog.sina.com.cn/s/blog_6d5560f00102vax6.html)
转自 http://blog.sina.com.cn/s/blog_6d5560f00102vax6.html Quartus II 中的文本编辑软件不好用,比较习惯与UE(Uedit32/ultra ...
- HTML5和CSS3基础教程(第8版)-读书笔记
第1章 网页的构造块 一个网页主要包括以下三个部分: n 文本内容(text content):在页面上让访问者了解页面内容的纯文字. n 对其他文件的引用(referen ...
- fragment 碎片整理
activity_m1.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xm ...
- Java集合类之ArrayList
学习Java的集合类 (1)成员变量以及初始化 private static final int DEFAULT_CAPACITY = 10; private static final Object[ ...
- (转)Quartus II和Modelsim的联合仿真(详细)
这篇文章不需要在modelsim中建库.映射.建工程等一些繁琐的步骤,直接使用modelsim中的默认work库.使用quartus+modelsim联合仿真. 首先推荐一篇文章 http://www ...
- 0728pm 控制器
- [JS]应用splice删除多元素时出现的坑
------------------------------------------------------------------------------------- 先看一个片段: var fr ...
- listView获取item的Edit内容,listView中的edit内容在滚动时自动赋值了前面的内容
Today I am going to explain how to create a ListView with EditText and why will we need a TextWatche ...