Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android导出签名应用程序包错误_Android_Xml_Api_Export_Apk - Fatal编程技术网

Android导出签名应用程序包错误

Android导出签名应用程序包错误,android,xml,api,export,apk,Android,Xml,Api,Export,Apk,当我尝试导出GoogleMao的签名应用程序包时,我在res/value/string.xml文件中遇到了这个错误。我该怎么办 app_name" is not translated in af, am, ar, be, bg, ca, cs, da, de, el, en-rGB, es, es-rUS, et, fa, fi, fr, hi, hr, hu, in, it, iw, ja, ko, lt, lv, ms, nb, nl, pl, pt, pt-rPT, ro, ru, sk,

当我尝试导出GoogleMao的签名应用程序包时,我在res/value/string.xml文件中遇到了这个错误。我该怎么办

app_name" is not translated in af, am, ar, be, bg, ca, cs, da, de, el, en-rGB, es, es-rUS, et, fa, fi, fr, hi, hr, hu, in, it, iw, ja, ko, lt, lv, ms, nb, nl, pl, pt, pt-rPT, ro, ru, sk, sl, sr, sv, sw, th, tl, tr, uk, vi, zh-rCN, zh-rTW, zu
Issue: Checks for incomplete translations where not all strings are translated
Id: MissingTranslation
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 all 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 tools prefix refers to the namespace declaration http://schemas.android.com/tools.)
app_name”未翻译成af、am、ar、be、bg、ca、cs、da、de、el、en rGB、es、es rUS、et、fa、fi、fr、hi、hr、hu、in、it、iw、ja、ko、lt、lv、ms、nb、nl、pl、pt rPT、ro、ru、sk、sl、sr、sv、sw、th、tl、tr、英国、vi、zh rCN、zh rTW、zu
问题:检查未翻译所有字符串的不完整翻译
Id:缺少翻译
如果应用程序有多个语言环境,则用一种语言声明的所有字符串也应翻译成所有其他语言。
如果不应翻译字符串,可以在元素上添加属性translateable=“false”,也可以在名为donottranslate.xml的资源文件中定义所有不可翻译字符串。或者,可以使用tools:ignore=“missingtransation”属性忽略此问题。
默认情况下,此检测器允许语言区域仅提供字符串的子集,并返回到标准语言字符串。通过设置环境变量ANDROID_LINT_COMPLETE_regions,可以要求所有区域提供完整翻译。
通过为资源文件中的根元素指定tools:locale=“languageCode”,可以告诉lint(和其他工具)res/values/文件夹中的默认语言是哪种语言。(工具前缀指命名空间声明)http://schemas.android.com/tools.)
试试这个

转到Eclipse->Window tab->Preferences->Android->Lint错误检查->取消选中完整的错误检查运行


在string.xml文件中添加
translateable=“false”
,可能会有帮助

<string name="app_name" translatable="false">Example App</string>
示例应用程序

只需将string.xml文件重命名为donottranslate.xml。这可能会对您有所帮助。

“窗口”>“首选项”>“Android”>“Lint错误检查”
中:

转到
missingtransation
行,并将其设置为警告:


尽管所有其他答案都是正确的,但另一个选项是将
工具:ignore=“missingtransation”
属性添加到xml文件:

<?xml version="1.0" encoding="utf-8"?>
<resources
    xmlns:tools="http://schemas.android.com/tools"
    tools:ignore="MissingTranslation" >

    <!-- your strings here; no need now for the translatable attribute -->
</resources>


我更喜欢这样做,因为a)它不需要更改每个字符串值,b)它不是一个应用程序设置,因此可以将其签入git。另一方面,如果错误出现在您没有写访问权限的引用项目中,则不会有帮助。

您是否创建了
value af
value am
等形式的文件夹这本书的复制品对我不起作用。我仍然会犯错误