您的位置:首页 > 移动开发

在单独编译android源码中的应用时出错make: *** [out/target/common/obj/APPS/TabPro_intermediates/src/R.stamp] 错误 1

2012-03-16 10:17 1001 查看
如果出现如题所述的错误,更细致一点说是出现如下所述的错误:

packages/apps/TabPro/res/layout/tab1.xml:7: error: Error: This attribute must be localized. (at 'text' with value 'tab1').

packages/apps/TabPro/res/layout/tab2.xml:7: error: Error: This attribute must be localized. (at 'text' with value 'tab2').

packages/apps/TabPro/res/layout/tab3.xml:7: error: Error: This attribute must be localized. (at 'text' with value 'tab3').

make: *** [out/target/common/obj/APPS/TabPro_intermediates/src/R.stamp] 错误 1

提示了错误“This attribute must be localized”,这种问题一般情况是因为在res/xml文件夹下的中

或者在res/layout下的文件中出现了没有多语言话的文本例如

<TextView

android:id="@+id/myTextView1"

android:text="tab1"

android:layout_width="fill_parent">

</TextView>

解决方式

在res/values/strings.xml中定义字符串

<string name="str_tab1">tab1</string>

然后把上面的内容改为

<TextView

android:id="@+id/myTextView1"

android:text="@string/str_str_tab1"

android:layout_width="fill_parent">

</TextView>

这是android强制实行多语言话
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐