在android中使用mmm命令编译程序是出现错误。

这种问题一般情况是因为在res/xml文件夹下的中, 或者在res/layout下的文件中出现了没有多语言话的文本例.

解决方法:

不直接在布局文件中写字符串,而是在res/values/strings.xml中写。

例如res/values/strings.xml

<string name="topLeftContent">TOP_LEFT</string>

布局文件中再引用

android:text="@string/topLeftContent"

Tony Liu

2017-3-23, Shenzhen

Android Error: This attribute must be localized.的更多相关文章

  1. Android studio应用导入源码错误This attribute must be localized

    This attribute must be localized 产生原因: 多语言错误,源码中关于语言的显示不能直接赋值,而是需要通过xml来实现: 例如 <TextView android: ...

  2. android在style中使用自定义属性 error: style attribute not found.

    异常: Error:(128, 5) error: style attribute 'com.honghui0531.prebiotics.view:attr/item_right_icon_src' ...

  3. 编译APK时出现 This attribute must be localized 的两种解决方法 免修改xml

    下面两种方法可以让你不需要修改APP XML字符串的条件下忽略 This attribute must be localized 的 Android 源码编译时的错误警告. 1.修改当前APP的 An ...

  4. Android error:No CPU/ABI system image available for this target

    原文:Android error:No CPU/ABI system image available for this target No CPU/ABI system image available ...

  5. Android Error:Could not find lottie.jar

    Android Error:Could not find lottie.jar 今天遇到了一个及其头疼的问题 同事的工程导到我的电脑里却报错,错误是找不到jcenter仓库里的lottie.jar包 ...

  6. 【React Native错误集】Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start of app

    问题1:Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start ...

  7. Android Error:You must supply a layout_width attribute……

    出现这种情况的可能原因目前本人碰到的有: 1:在xml文件中某个属性名或者属性值写错,请务必仔细检查你有没有写错某个拼写. 2:当你在,比如TextView中,没有声明layout_width,经测试 ...

  8. error: style attribute '@android:attr/windowEnterAnimation' not found.

    在Project/gradle.properties中添加 android.enableAapt2=false

  9. Android Error:warning: Ignoring InnerClasses attribute for an anonymous inner class

    今天项目发布时遇到了这个问题,在低版本设备上面死活发布不上去,还有打包也打不成功,折腾了好长一段时间,网上大部分给出的 解决方案都是说 在工程的混淆配置文件 proguard-rules.pro 中加 ...

随机推荐

  1. android笔记---百度地图api应用 (一)

    package com.example.bdtest; import com.baidu.mapapi.MKEvent; import com.baidu.mapapi.MKPlanNode; imp ...

  2. https://jzh.12333sh.gov.cn/jzh/

    https://jzh.12333sh.gov.cn/jzh/ https://superuser.com/questions/171917/force-a-program-to-run-withou ...

  3. 记录-UEFI启动的预装WIN8的笔记本里引导linux双系统

    新买了个联想笔记本,预装了WIN8,引导方式不再是几年前的MBR-BOIS引导了,是UEFI引导,所以,之前的grub4dos引导双系统方式都没用了. 现在把我装linux的关键过程记录下来,以备忘. ...

  4. java多线程16:join()的使用

    讲解join()方法之前请确保对于即wait()/notify()/notifyAll()机制已熟练掌握.可以参考前面的笔记 join()方法的作用是等待线程销毁.join()方法反应的是一个很现实的 ...

  5. docker之创建MariaDB镜像的方法

    一.基于commit命令方式创建 docker的安装 ? 1 2 3 [root@test01 ~]# yum install docker [root@test01 ~]# systemctl en ...

  6. pandas简单应用

    机器学习离不开数据,数据分析离不开pandas.昨天感受了一下,真的方便.按照一般的使用过程,将pandas的常用方法说明一下. 首先,我们拿到一个excel表,我们将之另存为csv文件.因为文件是实 ...

  7. zip伪加密

    简单的话来阐述 zip伪协议的意思是说本来不需要密码的zip文件然后通过修改标志位,然后就可以达到有密码的效果对吗?但是他实际是没有密码. 一个 ZIP 文件由三个部分组成: 压缩源文件数据区+压缩源 ...

  8. button上传替换file上传按钮,并显示图片缩略图,纯jsp操作

    1.jsp代码 <div class="inputBox"> <span id="tu" <c:if test="${pd = ...

  9. Android Toolbar的使用 顶部标题栏+后退键

    最近设计安卓里面有个标题栏,里面有个后退键,可以完成后退之类的功能. 好,刚好可以用Toolbar去实现 上代码:activity_main.xml <?xml version="1. ...

  10. WebSocket的Cookie问题(转)

    问题:我用Nginx作静态服务器,Node.js监听另外端口作WebSocket服务器,客户端创建实例时,如果origin和host不一样的话,req实例的headers中没有cookie… ###解 ...