Android Lintでエラーがでる
SmartWatchのアプリを作って、GooglePlayに登録しようと、Android ToolからExport Signed Apllication Package...を選択すると、Export AbortedとなってExportが止まってしまう現象が発生しました。
エラーの内容は、なになに・・・、
Export aborted because fatal lint errors were found. These are listed in the Lint View. Either fix these before running Export again, or turn off "Run full error check when exporting app" in the Android > Lint Error Checking preference page.
簡単に言うと、致命的なLintエラーが見つかったので修正してからエクスポートしろということです。Viewを見てねと書いてあるので、Viewを見ると下記のようなエラーが出ていました(エラーの一例です)。
"app_name" is not translated in ja, zh-rTW
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.
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.
「"app_name"が"ja"と"zh-rTW"に翻訳できない」と言っています。If 以降は解説でLintのDetailと同じです。
突然、"ja"が無いとか、"zh-rTW"が無いとか言われても、なんだかわからないので調べてみました。
SmartExtensionUtilsのリソースだった
探したところ、ライブラリに設定しているSmartExtensionUtilsのリソースに下記がありました。
res/values res/values-ja res/values-zh-rTW
ライブラリの言語リソース設定が、それを利用しているアプリのリソース設定にまで影響してくるようです。あれ、でもBitmapキャッチャをリリースしたときに、Lintエラーは出なかったのですが不思議です。
このエラーに対する対策は、「エラーを無視する」か「言語リソースを追加する」かのいずれかです。。