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
The error "This attribute must be localized" is prompted. This problem is generally caused by the presence of non-multilingual text in the res/xml folder or in the files under res/layout, such as
<TextView
android:id ="@+id/myTextView1"
android:text=" 0% "
android:layout_width="fill_parent">
</TextView> The
solution is to define a string <string name="str_tab1">
in res/values/strings.xml
0%</string>
and then change the above content to
<TextView
android:id="@+id/myTextView1"
android:text=" @string/str_tab1 "
android:layout_width="fill_parent">
</TextView>
this is android enforce multilingual
So the initialization must be in the string, even a small 0