packages/apps/TabPro/res/layout/tab1.xml:7: error: Error: This attribute must be localized. (at 'text' with value '0%').
packages/apps/TabPro/res/layout/tab2.xml:7: error: Error: This attribute must be localized. (at 'text' with value '0%').
packages/apps/TabPro/res/layout/tab3.xml:7: error: Error: This attribute must be localized. (at 'text' with value '0%').
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="0%"
android:layout_width="fill_parent">
</TextView>
解决方式
在res/values/strings.xml中定义字符串
<string name="str_tab1">0%</string>
然后把上面的内容改为
<TextView
android:id="@+id/myTextView1"
android:text="@string/str_tab1"
android:layout_width="fill_parent">
</TextView>
这是android强制实行多语言话
所以说初始化一定要在string中,即使是一个小小的0