【发布时间】:2013-05-06 20:53:13
【问题描述】:
尝试对 XML 文件进行一些更改并引发新问题:
她的密码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
xmlns:map="http://schemas.android.com/apk/res/android"
map:id="@+id/map"
map:name="com.google.android.gms.maps.MapFragment"
map:layout_width="wrap_content"
map:layout_height="250dp" />
</LinearLayout>
出现错误
xmlns:map="http://schemas.android.com/apk/res/android"
标签片段的非预期命名空间前缀“xmlns”
【问题讨论】:
-
但是如果两个命名空间相同,为什么还要声明呢?
xmlns:android和xmlns:android', both are referring same namespaceschemas.android.com/apk/res/android`