HardBirch

[解决方案]Unexpected namespace prefix “xmlns” found for tag Layout

时间:13-02-19 栏目:android学习笔记 作者:魔豆先生 评论:0 点击: 25,671 次

形如这样的代码,出现Error:

<?xml version="1.0" encoding="utf-8"?>

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:background="@drawable/background" >

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="vertical" >

<TextView android:id="@+id/menu_top_text"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="@string/name_version"

android:textColor="@color/black"

android:textSize="20sp" />

 

Error:  "Unexpected namespace prefix "xmlns" found for tag LinearLayout". I tried the solutions provided in other similar questions also but it didn't work for me. Same error is occurr.

 

Solution:

Please try following:

1.Remove "?xml version="1.0" encoding="utf-8"?" line from the top.

2.Remove "xmlns:android="http://schemas.android.com/apk/res/android" from all the place excluding the ScrollView. I believe it is sufficient to inform it to the application once.

去掉 第二个"xmlns:android="http://schemas.android.com/apk/res/android" 

 

That's All Thanks!

版权所有,转载请注明文章来源 & 保留原文链接!

声明: 本文由( 魔豆先生 )原创编译,转载请保留链接: [解决方案]Unexpected namespace prefix “xmlns” found for tag Layout

[解决方案]Unexpected namespace prefix “xmlns” found for tag Layout:等您坐沙发呢!

发表评论


QQ群互动

Linux系统与内核学习群:194051772

WP建站技术学习交流群:194062106

魔豆之路QR

魔豆的Linux内核之路

魔豆的Linux内核之路

优秀工程师当看优秀书籍

优秀程序员,要看优秀书!

赞助商广告

友荐云推荐