编译:
1,需要jre1.6, 64bit的机器。
2,错误 “This attribute must be localized”
|
提示了错误“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强制实行多语言话 |
解决Android多语言编译错误
本文介绍了解决Android开发中出现的特定编译错误——'Thisattributemustbelocalized'的方法。该错误通常发生在未实现多语言支持的XML资源文件中。文章提供了具体的步骤来修复这一问题,包括如何在strings.xml中定义多语言字符串资源,并在布局文件中引用这些资源。
1425

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



