Thursday, January 23, 2014

Why is this my android. Xml file error



Error :: Unexpected namespace prefix "xmlns" found for tag LinearLayout



  
android: orientation = "vertical" android: layout_width = "fill_parent"
android: layout_height = "fill_parent">

android: orientation = "horizontal" android: layout_width = "fill_parent"
android: layout_height = "fill_parent" android: layout_marginLeft = "20dp"
android: layout_marginRight = "20dp">
android: textSize = "20dp" android: layout_height = "wrap_content" />
android: layout_height = "wrap_content" />

android: orientation = "horizontal" android: layout_width = "fill_parent"
android: layout_height = "fill_parent" android: layout_marginLeft = "20dp"
android: layout_marginRight = "20dp">
android: layout_height = "wrap_content" android: text = "Password:"
android: textSize = "20dp" />
android: layout_height = "wrap_content" android: password = "true" />




Reply:
My novice just encountered this problem, and then I found the format that you put down the code aligned no problem, you try to change the format of the following look at it:

xmlns: android = "http://schemas.android.com/apk/res/android"
android: orientation = "vertical"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent">
xmlns: android = "http://schemas.android.com/apk/res/android"
android: orientation = "horizontal"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: layout_marginLeft = "20dp"
android: layout_marginRight = "20dp">
android: layout_width = "wrap_content"
android: text = "User name:"
android: textSize = "20dp"
android: layout_height = "wrap_content" />
android: layout_width = "fill_parent"
android: layout_height = "wrap_content" />

xmlns: android = "http://schemas.android.com/apk/res/android"
android: orientation = "horizontal"
android: layout_width = "fill_parent"
android: layout_height = "fill_parent"
android: layout_marginLeft = "20dp"
android: layout_marginRight = "20dp">
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: text = "Password:"
android: textSize = "20dp" />
android: layout_width = "fill_parent"
android: layout_height = "wrap_content"
android: password = "true" />


Reply:
Or click Project -> Clean and then Run As
Reply:
Usually require only the top layer needs to Layout xmlns: android = "http://schemas.android.com/apk/res/android" attribute.
Other Layout remove the xmlns attribute.
Reply:
cited landlord lihancong55 reply:
error :: Unexpected namespace prefix "xmlns" found for tag LinearLayout





Plain Text code
?



1234567891011121314151617181920212223242526



Removal of the middle two LinearLayout xmlns: android attribute




Reply:
Recommended to remove the middle two layout of xmlns: android = "http://schemas.android.com/apk/res/android", it may be because of this error, the specific norms can look xml file. .
Reply:
Repeat defines the namespace, remove the excess back xmlns: android = "http://schemas.android.com/apk/res/android", keep the front of the linearlayout that can be
Reply:
The original of this kind I really have to go try to modify a bit of thank you reply friend
Reply:
Note that there are no such restrictions too ...
Reply:
So this is
Reply:

Reply:
The original is so
Reply:
Removal of the middle two LinearLayout xmlns: android attribute because namespace defines
repeat
Reply:

No comments:

Post a Comment