eclipse中编译没有问题,但是在make自己建立的项目的时候,提示了错误“This attribute must be localized”,这种问题一般情况是因为在res/xml文件夹下的中
或者在res/layout下的文件中出现了没有多语言化的文本例如
<TextView
android:id="@+id/myTextView1"
android:text="type"
android:layout_width="fill_parent">
</TextView>
解决方式
在res/values/strings.xml中定义字符串
<string name="str_type">type</string>
然后把上面的内容改为
<TextView
android:id="@+id/myTextView1"
android:text="@string/str_type"
android:layout_width="fill_parent">
</TextView>
这是android强制实行多语言化
This attribute must be localized”
最新推荐文章于 2022-02-11 20:10:38 发布
本文详细介绍了在Eclipse中遇到的'This attribute must be localized'错误的解决方案,涉及到在XML文件中使用多语言化的字符串定义。通过在res/values/strings.xml中定义字符串,并在布局文件中引用这些字符串,可以有效避免此类问题,实现应用的国际化。
1461

被折叠的 条评论
为什么被折叠?



