why Unexpected namespace prefix "xmlns" found for tag fragment
Unexpected namespace prefix "map" found for tag fragment?
<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=".Main">
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="@+id/map"
android:name="com.google.android.gms.maps.MapFragment"
map:mapType="satellite"/>
</RelativeLayout>
why Unexpected namespace prefix "xmlns" found for tag fragment Unexpected namespace prefix "map" found for tag fragment ?
Remove xmlns:android="http://schemas.android.com/apk/res/android"
from the <fragment>
element, and consider moving xmlns:map="http://schemas.android.com/apk/res-auto"
from the <fragment>
element to the root element.
For example, this is valid:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="@+id/foo"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"
map:mapType="satellite"/>
</RelativeLayout>
Obviously this is just a mis-lead Lint check error. You can remove it when, in Eclipse's Problem view, you right-click the line with the error, select the Quick fix option and select e.g. Ignore Check for project.
The error goes away, the project builds and the app runs perfectly well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With