android菜瓜笔记之android lint problem
16lz
2021-01-25
今天修改代码,将功成clean了一次,结果出现了错误,某个xml的布局文件报错。错误为:
错误类型为android lint problem
Unexpected namespace prefix "app" found for tag fragmentfr_discover.xml/Test/res/layoutline 6Android 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)就可以了.
更多相关文章
- 一款常用的 Squid 日志分析工具
- GitHub 标星 8K+!一款开源替代 ls 的工具你值得拥有!
- RHEL 6 下 DHCP+TFTP+FTP+PXE+Kickstart 实现无人值守安装
- Linux 环境下实战 Rsync 备份工具及配置 rsync+inotify 实时同步
- 使用setContentView的方式更换布局文件从而更换界面
- Android(安卓)圆角图片CircleImageView
- Android(安卓)ViewPager实例代码介绍2。
- Android(安卓)APK反编译详解[转]
- Failed to fectch URl https://dl-ssl.google.com/android/repos