现象:
Android导出APK包时出现,编译调试时不会出现。
错误信息:
Error:(16) Error: "baidutieba_client_inavailable" is not translated in "en" (English) [MissingTranslation]
Error:(63) Error: "baidutieba" is not translated in "en" (English) [MissingTranslation] Error:(67) Error: "share_to_baidutieba" is not translated in "en" (English) [MissingTranslation]
错误截图:
最终在StackOverFlow上找到了解决方法,大概有这么几种方法,现整理如下,供大家参考:
解决办法:
1、使用Android studio可以在build.gradle中的android中添加lintOptions
lintOptions {
checkReleaseBuilds false
abortOnError false
}
或
lintOptions {
disable 'MissingTranslation'
}
2、尝试添加translatable=”[true / false]”
<string name="junkchen" translatable="false">Junk Chen!</string>
3、resources 标签内增加xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation"两个属性即可
<resources
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation" >
4、指定语言
<resources
xmlns:tools="http://schemas.android.com/tools"
tools:locale="en" >
</resources>