我在许多地图示例中遇到过这样的代码:
<relativeLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" xmlns:tools="http://schemas.androID.com/tools" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" tools:context=".MainActivity" > <fragment xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:ID="@+ID/map" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" /></relativeLayout>
然而,对于他们所有人来说,我得到了错误
Description Resource Path Location Type Unexpected namespace prefix
“xmlns” found for tag
fragment activity_msmap.xml /example/res/layout line 8 AndroID lint
Problem
在线
<fragment xmlns:androID="http://schemas.androID.com/apk/res/androID"
那么……这里发生了什么?我在各地的例子中看到它,但它导致我的Eclipse / AndroID出错?另外,为什么在父元素中也定义了同样的xml命名空间?
解决方法:
您无法在xml布局中两次定义命名空间.
只需从片段中删除它,relativeLayout已经定义了xmlns:androID命名空间.
<fragment androID:ID="@+ID/map" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" />
总结 以上是内存溢出为你收集整理的令人费解的Android xmlns错误全部内容,希望文章能够帮你解决令人费解的Android xmlns错误所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)