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

转载 2015年07月10日 14:16:34
转自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

相关文章推荐

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

在使用mmm单独编译android应用程序时出现如下错误: mmm packages/apps/BoardconLED/ =====================================...

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

如果出现如题所述的错误,更细致一点说是出现如下所述的错误: packages/apps/TabPro/res/layout/tab1.xml:7: error: Error: This attrib...

This attribute must be localized错误

eclipse中编译没有问题,但是在make自己建立的项目的时候, 提示了错误“This attribute must be localized”,这种问题一般情况是因为在res/xml文件夹下的中...
  • CNnumen
  • CNnumen
  • 2012年07月10日 17:53
  • 5809

This attribute must be localized.错误解决方式

eclipse中编译没有问题,但是在make自己建立的项目的时候,提示了错误“This attribute must be localized”,这种问题一般情况是因为在res/xml文件夹下的中或者...

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

FROM:http://blog.csdn.net/qinyun188/article/details/7466973 在使用mmm单独编译Android应用程序时出现如下错误: mmm pac...

Java设计模式-命令模式Command

定义 将来自客户端的请求传入一个对象,从而使你可用不同的请求对客户进行参数化。用于“行为请求者”与“行为实现者”解耦,可实现二者之间的松耦合,以便适应变化。分离变化与不变的因素。 UML图: 角...

Android 如何获取apk大小与时间

原文地址 通过PackageManager获得已安装程序: java代码: List installedList = mPackageManager.getInstalledPackages(...

VS2010编译错误 #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403的解决方法

下载的一个MFC工程,在VS2010(工程是被转换为VS2010工程的)上编译遇到如下错误: 1>  stdafx.cpp 1>d:\program files\microsoft visual ...

VS2010编译错: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403...的解决方法

VS2010编译错: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403...的解决方法 ...

Your content must have a ListView whose id attribute is 'android.R.id.list' 解决方法

解决方法是: 在ListView显示列表的时候,必须在main.xml文件里加上ListView这一个控件把标签ListView的id改为“android:id/list” 这个id表示是系统自...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Error: This attribute must be localized. 解决方法
举报原因:
原因补充:

(最多只允许输入30个字)