Unexpected namespace prefix "xmlns" found for tag Linear Layout

简介: 原文地址http://blog.csdn.net/taxuexumei/article/details/41523419今天遇到的问题,,,保存到博客里,下回遇到找博客就行了,,,,,,今天在制作安卓UI嵌套式布局的时候,当出入以下的的代码的时候出现以下情况:                                            【】此括号内标记的东西出现红色下划线。

原文地址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了。

 

目录
相关文章
|
23天前
|
XML Android开发 数据格式
Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class
Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class
20 0
|
2月前
|
Java
No tag [else] defined in tag library imported with prefix [c]] with root cause
No tag [else] defined in tag library imported with prefix [c]] with root cause 错误处理
16 0
解决AttributeError: ‘Namespace‘ object has no attribute ‘arch‘
解决AttributeError: ‘Namespace‘ object has no attribute ‘arch‘
655 0
|
Android开发
解决 error: style attribute '@android:attr/windowEnterAnimation' not found.
解决 error: style attribute '@android:attr/windowEnterAnimation' not found.
145 0
Access context of data source and work center view do not match
这个错误消息提示我们,data source的access context和待分配到工作中心的access context必须匹配:
Access context of data source and work center view do not match
if match header test - 428 Precondition required
Created by Wang, Jerry, last modified on Mar 25, 2015
if match header test - 428 Precondition required
OPA PropertyStrictEquals match check logic
OPA PropertyStrictEquals match check logic
87 0
OPA PropertyStrictEquals match check logic
|
算法
On the Correct and Complete Enumeration of the Core Search Space
在之前的文章中我们讨论了基于graph的DP-based算法,来解决join ordering的枚举问题。 这些DP算法通过join predicate描述的连通性,解决了枚举可能的表组合问题,但join graph本身(即使hypergraph)是无法完整的描述join语义的,因为连通边本身无法描述不同类型的join语义,例如left outer join/semi join/anti join...,因此即使找到了所谓的csg-cmp-pair,也不一定是有效的plan。 这篇paper讨论的就是这个问题,当枚举出一个csg-cmp-pair (S1 o S2),如何判断这是有效的join
374 0
On the Correct and Complete Enumeration of the Core Search Space