AndroidStudio打包出现"xxx" is not translated in "zh" (Chinese) [MissingTranslation]
2016-12-28 00:00
996 查看
今天在打包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 attribute
l your non-translatable strings in a resource file called
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 variable
You can tell lint (and other tools) which language is the default language in your
如果一个字符串不需要翻译,可以添加属性
参考:http://blog.csdn.net/gentlemanyc/article/details/50578466
解决方法:
看它的描述可以直接解决问题:
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 attribute
translatable="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 a
tools: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 variable
ANDROID_LINT_COMPLETE_REGIONS.
You can tell lint (and other tools) which language is the default language in your
res/values/folder by specifying
tools:locale="languageCode"for the root
<resources>element in your resource file. (The
toolsprefix refers to the namespace declaration
http://schemas.Android.com/tools.)
如果一个字符串不需要翻译,可以添加属性
translatable="false"在<string>标签里。如:
<string name="name" translatable="false">Android</string> 或者把你不需要翻译的字符串统一放到一个[code=plain]donottranslate.xml中去。或者给根标签加一个属性
tools:ignore="MissingTranslation"来忽略这个问题。如:[/code]
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
参考:http://blog.csdn.net/gentlemanyc/article/details/50578466
相关文章推荐
- AndroidStudio打包出现"xxx" is not translated in "zh" (Chinese) [MissingTranslation]
- AndroidStudio打包出现"xxx" is not translated in "zh" (Chinese) [MissingTranslation]
- 打包提示 xxx is not translated in "zh" (Chinese)
- Android studio中打包apk出现"XXX" is translated here but not found in default locale的解决问题的方法
- android打包时出现***is not translated in "zh-rCN" (Chinese: China)
- APK打包过程中出现Error:"app_name" is not translated in "zh" (Chinese)[Missing Translation]
- Android应用程序打包时,出现错误:"XXX" is not translated in..
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- Android Studio打包出现Error:(4) Error: "text" is not translated in "zh" (Ch......
- 提示xxx is not translated in "zh" (Chinese)==
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- Android应用程序打包时,出现错误:"XXX" is not translated in .....
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" , "am" , "ar" ....
- 开发中碰到的问题:Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arab
- "XXXX" is not translated in "en" (English), "zh" (Chinese)
- Android应用程序打包时,出现错误:"XXX" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic).....