展会信息港展会大全

This attribute must be localized.错误解决方式
来源:互联网   发布日期:2016-01-14 11:10:05   浏览:1338次  

导读:eclipse中编译没有问题,但是在make自己建立的项目的时候,提示了错误This attribute must be localized,这种问题一般情况是因为在res/xml文件夹下的中或者在res/layout下的文件中出现了没有多语言话的文本......

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强制实行多语言话

赞助本站

人工智能实验室
AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港