关闭

Error: This attribute must be localized. 解决方法

标签: androidmmm
1852人阅读 评论(0) 收藏 举报
分类:
转自VC错误:http://www.vcerror.com/?p=1619
问题描述:

在使用mmm单独编译android应用程序时出现如下错误:

mmm packages/apps/BoardconLED/
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=idea6410
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRJ22
============================================
make: Entering directory `/home/cheyan/Android/6410/sbc6410_android2.3.4_20120315'
target R.java/Manifest.java: BoardconLedTest (out/target/common/obj/APPS/BoardconLedTest_intermediates/src/R.stamp)
res/layout/main.xml.bak:0: error: Resource entry main is already defined.
res/layout/main.xml:0: Originally defined here.
packages/apps/BoardconLED/res/values/strings.xml.bak:4: error: Resource entry app_name is already defined.
packages/apps/BoardconLED/res/values/strings.xml:3: Originally defined here.
packages/apps/BoardconLED/res/layout/main.xml.bak:8: error: Error: This attribute must be localized. (at 'text' with value 'on').
packages/apps/BoardconLED/res/layout/main.xml.bak:17: error: Error: This attribute must be localized. (at 'text' with value 'led1').
packages/apps/BoardconLED/res/layout/main.xml.bak:26: error: Error: This attribute must be localized. (at 'text' with value 'led2').
packages/apps/BoardconLED/res/layout/main.xml.bak:35: error: Error: This attribute must be localized. (at 'text' with value 'led3').
packages/apps/BoardconLED/res/layout/main.xml.bak:44: error: Error: This attribute must be localized. (at 'text' with value 'led4').
packages/apps/BoardconLED/res/layout/main.xml.bak:53: error: Error: This attribute must be localized. (at 'text' with value 'off').
packages/apps/BoardconLED/res/layout/main.xml.bak:62: error: Error: This attribute must be localized. (at 'text' with value 'on').
packages/apps/BoardconLED/res/layout/main.xml.bak:71: error: Error: This attribute must be localized. (at 'text' with value 'off').
packages/apps/BoardconLED/res/layout/main.xml.bak:80: error: Error: This attribute must be localized. (at 'text' with value 'on').
packages/apps/BoardconLED/res/layout/main.xml.bak:89: error: Error: This attribute must be localized. (at 'text' with value 'off').
packages/apps/BoardconLED/res/layout/main.xml.bak:98: error: Error: This attribute must be localized. (at 'text' with value 'on').
packages/apps/BoardconLED/res/layout/main.xml.bak:107: error: Error: This attribute must be localized. (at 'text' with value 'off').
packages/apps/BoardconLED/res/layout/main.xml.bak:116: error: Error: This attribute must be localized. (at 'text' with value 'All on').
packages/apps/BoardconLED/res/layout/main.xml.bak:125: error: Error: This attribute must be localized. (at 'text' with value 'All off').
make: *** [out/target/common/obj/APPS/BoardconLedTest_intermediates/src/R.stamp] Error 1
make: Leaving directory `/home/cheyan/Android/6410/sbc6410_android2.3.4_20120315'

“This attribute must be localized”,这种问题一般情况是因为在res/layout下的文件中出现了没有多语言话的文本例如

<Button
android:id="@+id/btnLED1On"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="on"
android:layout_x="8px"
android:layout_y="42px"
>
</Button>

解决方法:
具体的解决方法参考文章:http://www.vcerror.com/?p=1619
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:842079次
    • 积分:9392
    • 等级:
    • 排名:第1923名
    • 原创:93篇
    • 转载:457篇
    • 译文:0篇
    • 评论:29条