should use @string resource activity_main.xml

报错虽不影响运行,但是应养成良好的编码习惯!

解决方案:

1、在value 文件 strings.xml文件中定义该控件要显示的文本信息,<string name="edit_txt"> hello</string>

2、然后在activity_main.xml 文件中为该控件节点添加引用刚定义的字符串变量android:text="@string/edit_txt" >

3、保存,OK!

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念