Error parsing XML: unbound prefix on XXX解决办法
来源:互联网 发布:短信变号软件 编辑:程序博客网 时间:2024/05/19 11:46
在XML文件中使用了自定义的域名空间(ns),如app:,编译时报错XXX
XML文件类似于如下:
<?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”
阅读全文
0 0
- Error parsing XML: unbound prefix on XXX解决办法
- Error parsing XML: unbound prefix on XXX解决办法
- error: Error parsing XML: unbound prefix 解决办法
- Error parsing XML: unbound prefix
- Error parsing XML: unbound prefix
- Error parsing XML: unbound prefix
- 报错error:Error parsing XML:unbound prefix的解决办法
- Error parsing XML: unbound prefix on library 解决方法
- error:Error parsing XML:unbound prefix
- error:Error parsing XML:unbound prefix
- android - error: Error parsing XML: unbound prefix
- error: Error parsing XML: unbound prefix 总结
- error: Error parsing XML: unbound prefix
- error: Error parsing XML: unbound prefix
- error error parsing xml unbound prefix
- error: Error parsing XML: unbound prefix
- error:Error parsing XML:unbound prefix
- error: Error parsing XML: unbound prefix
- Java入门基础之【循环结构】8
- [Leetcode] 317. Shortest Distance from All Buildings 解题报告
- java多线程实现生产者与消费者
- hadoop 问题汇总
- ctests cahis
- Error parsing XML: unbound prefix on XXX解决办法
- AES加解密算法二
- Android studio 项目构建五|合并多个清单文件
- java.lang.IllegalArgumentException: node to traverse cannot be null!
- c/c++编译原理
- 一个软链接导致的系统崩塌
- 常见的tools ,一般你没怎么用它的
- Ioc和Aop的扩展
- Maven POM.xml 标签详解