Error parsing XML: unbound prefix on XXX解决办法
2014-11-20 17:45
369 查看
在XML文件中使用了自定义的域名空间(ns),如app:,编译时报错XXXXML文件类似于如下:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout android:orientation="vertical" android:id="@+id/myScrollLayout" android:layout_width="fill_parent" android:layout_height="wrap_content"> <TextView android:layout_height="wrap_content" android:layout_width="fill_parent" android:text="Family" android:id="@+id/Family" android:textSize="16px" android:padding="5px" android:textStyle="bold" android:gravity="center_horizontal"> </TextView> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:scrollbars="vertical"> <LinearLayout android:orientation="vertical" android:id="@+id/myMainLayout" android:layout_width="fill_parent" android:layout_height="wrap_content"> </LinearLayout> </ScrollView> </LinearLayout>解决方案:增加域名空间:
A couple of reasons that this can happen: 1) You see this error with an incorrect namespace, or a typo in the attribute. Like 'xmlns' is wrong, it should be xmlns:android 2) First node needs to contain: xmlns:android="http://schemas.android.com/apk/res/android" 3) If you are integrating AdMob check custom parameters like ads:adSize, you need xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" 4) If you are using LinerLayout you might have to define tools xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
相关文章推荐
- Error parsing XML: unbound prefix on XXX解决办法
- Error parsing XML: unbound prefix on library 解决方法
- 举例说明android编程中遇到Error parsing XML: unbound prefix错误的原因及解决办法
- android编程中遇到的关于Error parsing XML: unbound prefix错误的原因及解决办法
- Error parsing XML: unbound prefix解决方式
- Error parsing XML: unbound prefix解决方式
- Parsing error processing resource path /WEB-INF/struts-config.xml解决办法
- android编译时报错:Error parsing XML: unbound prefix 的错误原因及解决方案
- 解决org.apache.jasper.JasperException: org.apache.jasper.JasperException: XML parsing error on file org.apache.tomcat.util.scan.MergedWebXml
- Android xliff和字符串资源(Error parsing XML: unbound prefix)
- error: Error parsing XML: not well-formed (invalid token)解决办法
- Parsing error processing resource path /WEB-INF/struts-config.xml解决办法
- android - error: Error parsing XML: unbound prefix
- PHP webservice错误:XML error parsing SOAP payload on line 1解决方法
- 报错error:Error parsing XML:unbound prefix的解决办法
- Error Parsing XML: unbound prefix--关于Android中的xliff
- error error parsing xml unbound prefix
- android编写UI出现error: Error parsing XML: unbound prefix 的错误原因及解决方案
- error: Error parsing XML: unbound prefix
- 使用自定义控件报错error: Error parsing XML: unbound prefix ---sep