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

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

2013-06-09 15:16 771 查看


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

在单独编译android浏览器源码的时候,发生上面的错误,原来因为我把引用的字符串直接写到xml文件中了,这样是不可以的。必须写在string.xml中才行。

如果出现如题所述的错误,更细致一点说是出现如下所述的错误:

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

参考链接:
http://blog.csdn.net/listening_music/article/details/7359721
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐