2011年7月份开发的android应用程序,如今重新搭建eclipse android开发环境温故一下,发现layout的xml管理器报了许多警告和一个错误:
1 [I18N] Hardcoded string "Button", should use @string resource
2 This RelativeLayout layout or its LinearLayout parent is possibly useless
3
Avoid using "px" as units; use "dp" instead
4
Should use "sp" instead of "dp" for text sizes
5 [Accessibility] Missing contentDescription attribute on image
6 [ERROR] Unexpected namespace prefix "xmlns" found for tag RelativeLayout
点击右上角的红色按钮,选择fix或suppress issue,即可解决问题。