今天修改代码,将功成clean了一次,结果出现了错误,某个xml的布局文件报错。错误为:
错误类型为android lint problem
Unexpected namespace prefix "app" found for tag fragment fr_discover.xml /Test/res/layout line 6 Android Lint Problem
xml布局文件为
<?xml version="1.0" encoding="utf-8"?>
<com.livestream.android.widgets.KeyboardAwareLinearLayout android:orientation="vertical" android:id="@id/fr_discover_root_layout" android:background="#ffdde2e8" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<fragment android:name="com.livestream.android.fragment.HeaderFragment_" android:id="@id/fr_discover_header_fragment" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<span style="color:#ff6666;"><strong><fragment android:name="com.livestream.android.fragment.EventsListFragment_" android:id="@id/fr_discover_events_list_fragment" android:layout_width="fill_parent" android:layout_height="fill_parent" app:header="@layout/tr_fr_search_listview_header" /></strong>
</span> <FrameLayout android:id="@id/fr_search_listview_layout" android:background="#ff303030" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ListView android:id="@id/fr_search_listview" android:background="@color/transparent" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:divider="#ff262626" android:dividerHeight="1.0dip" />
</FrameLayout>
</FrameLayout>
</com.livestream.android.widgets.KeyboardAwareLinearLayout>
报错部分为红色字体部分
解决办法:
到eclips的problems 标签找到这个错误然后选择quick fix菜单,在弹出的菜单中选择不检查这个文件(Disable check in this file only)就可以了.