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

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

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下的文件中出现了没有多语言话的文本例如
android:id="@+id/myTextView1"
android:text="
tab1"
android:layout_width="fill_parent">

解决方式
在res/values/strings.xml中定义字符串
tab1

然后把上面的内容改为
android:id="@+id/myTextView1"
android:text="@string/str_str_tab1"
android:layout_width="fill_parent">

这是android强制实行多语言话

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