新手字符串错误

时间:2014-07-25 14:23:55

标签: android eclipse string

你能告诉我为什么每个字符串行都有错误吗?

<string> name="app_name">Bootle JFL</string>
<string> name="hello_world">Hello world</string>
<string> name="action_settings">Settings</string>

3 个答案:

答案 0 :(得分:2)

更改为

 <string name="app_name">Bootle JFL</string>
 <string name="hello_world">Hello world</string>
 <string name="action_settings">Settings</string>

name是标记字符串的属性,属性必须在字符串标记内。

http://developer.android.com/guide/topics/resources/string-resource.html

答案 1 :(得分:2)

你太早关闭了字符串标签

 <string name="app_name"> Bootle JFL</string> 

表示所有字符串,

答案 2 :(得分:0)

你有两个关闭&gt;应该像

<string name="app_name">Bootle JFL</string>

相关问题