博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
AndroidStudio打包出现"xxx" is not translated in "zh" (Chinese) [MissingTranslation]
阅读量:6902 次
发布时间:2019-06-27

本文共 1382 字,大约阅读时间需要 4 分钟。

hot3.png

今天在打包apk时出现了"xxx" is not translated in "zh" (Chinese) [MissingTranslation]的错误。

解决方法:

看它的描述可以直接解决问题:

Incomplete translation

If an application has more than one locale, then all the strings declared in one language should also be translated in all other languages.
If the string should not be translated, you can add the attributetranslatable="false" on the <string> element, or you can define al

l your non-translatable strings in a resource file called donottranslate.xml. Or, you can ignore the issue with atools:ignore="MissingTranslation" attribute.

By default this detector allows regions of a language to just provide a subset of the strings and fall back to the standard language strings. You can require all regions to provide a full translation by setting the environment variableANDROID_LINT_COMPLETE_REGIONS.
You can tell lint (and other tools) which language is the default language in yourres/values/ folder by specifying tools:locale="languageCode" for the root<resources> element in your resource file. (The tools prefix refers to the namespace declarationhttp://schemas..com/tools.)

如果一个字符串不需要翻译,可以添加属性translatable="false"在<string>标签里。如:

Android
或者把你不需要翻译的字符串统一放到一个donottranslate.xml中去。或者给根标签加一个属性tools:ignore="MissingTranslation"来忽略这个问题。如:

参考:http://blog.csdn.net/gentlemanyc/article/details/50578466

转载于:https://my.oschina.net/u/1260221/blog/813896

你可能感兴趣的文章
Nvidia 390.77 发布:修复错误并增强Linux内核兼容性
查看>>
ORACLE常见的六种RMAN恢复测试
查看>>
Windows 10企业批量部署实战之WDS安装
查看>>
有关注解
查看>>
SlidingDrawer教程
查看>>
用户信息缓存策略
查看>>
React Native基础&入门教程:以一个To Do List小例子,看props和state
查看>>
(Portal 开发读书笔记) Personalization
查看>>
SRCNN 实验细节
查看>>
Java多线程第二节-线程的基本使用
查看>>
Druid Kafka indexing service (上篇 )
查看>>
界面控件Essential Studio for ASP.NET Web Forms 2017 v3发布丨附下载
查看>>
谷歌宣布为Android 9.0用户提供云端加密
查看>>
8.12 tee_tr_split命令
查看>>
gzip bzip2 xz 压缩工具
查看>>
Windriver for linux安装
查看>>
HTTP协议学习# request 和response 解析(转)
查看>>
Linux学习-0918
查看>>
Redis在mac上的安装
查看>>
Jmeter
查看>>