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 ...
随机推荐
- 慕课网JavaScript入门篇课程笔记
1.js注释很重要 单行注释,在注释内容前加符号 “//”. <script type="text/javascript"> document.write(" ...
- [C#]循环输出 000 - 999999
循环输出 000 - 999999 ; i < ; i++) { , i.ToString().Length); j < 7; j++) { Debug.WriteLine(i.ToStr ...
- 修改navigationbar右侧按钮离屏幕边缘位置
先上代码 UIButton *settingBtn = [Utils creatCustomButtonWithFrame:CGRectMake(, , , ) btnTitle: titleColo ...
- SQL Server 查看物理页存储
创建测试表 Use Test create table dbo.employee( emp_lname varchar(12) not null, emp_fname varchar(12)not n ...
- Position a child div relative to parent container in CSS: [设置 子DIV位置 跟 父DIV相关联]
最近调DIV的位置比较头疼,各种position: relative / absolute google到一篇好文章[http://www.webdevdoor.com/html-css/css-po ...
- 第六次课:springMVC与spring的集成
spring在项目中起到了管理bean的作用,即可以通过配置,让系统自动创建所需的对象,通过一定的方式引用系统创建的对象,对象的创建和引用都是由spring自动完成的,用户不必参与,可以直接引用. 实 ...
- c# 框架学习(nop )总结-------删除功能
删除直接使用(框架中以封装好的) 控制中写就可以啦 public ActionResult Delete(int id) { //权限位置(若需要的话)var individual = _indivi ...
- Windows 打印控件
Windows窗体的PrintDocument组件用于设置一些属性,这些属性说明,在基于Windows的应用程序中要打印说明内容以及打印文档的能力,可将它与PrintDialog组件一起使用来控制文档 ...
- linux下杀死进程(kill)的N种方法
常规篇: 首先,用ps查看进程,方法如下: $ ps -ef ……smx 1822 1 0 11:38 ? 00:00:49 gnome-terminalsmx ...
- hadoop 集群部署ganglia 监控服务与nagios 报警服务
1. 部署ganglia 服务 ganglia 涉及到的组件: 数据监测节点(gmond):这个部件装在需要监测的节点上,用于收集本节点的运行情况,并将这些统计信息传送到gmetad, ...