Mam irytujący problem. Używam fragmentu w moim projekcie Android i powoduje on niekończący się ból, ponieważ muszę oczyścić projekt za każdym razem, gdy edytuję główny plik xml. Tak to wygląda:Należy wyczyścić cały projekt Android w Eclipse za każdym razem, gdy edytowany jest plik XML
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<fragment xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
class="com.google.android.gms.maps.MapFragment"
map:uiRotateGestures="false"
map:uiScrollGestures="false"
map:uiZoomControls="false"
map:uiZoomGestures="false"
map:cameraZoom="18"
/>
<ScrollView
android:id="@+id/scroller"
android:layout_width="250dp"
android:layout_height="100dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:background="@android:color/white">
<TextView
android:id="@+id/debug_text"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textSize="10sp"
/>
</ScrollView>
</RelativeLayout>
I jeśli nawet jeden znak edytować tego pliku, wszystkie linie zaczynające się od „mapy” się podświetlone na czerwono, a fragment otwarcie tag zostanie podświetlony, jak również. Błąd otrzymuję to:
Unexpected namespace prefix "xmlns" found for tag fragment
A dla linii zaczynających się od „mapy” jest błąd:
Unexpected namespace prefix "map" found for tag fragment
Gdybym oczyścić projekt problem zniknie i mogę zbudować i uruchomić Projekt jest w porządku, ale ponieważ teraz go edytuję, jest bardzo denerwujący. Czy ktoś może pomóc?