Gingerbreadがリリースされた後、ADTを最新バージョンにアップデートしました。そして今
<string name="date_format">%d:%d %s</string>
次のエラーが表示されます
Multiple annotations found at this line:
- error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false"
attribute?
- error: Unexpected end tag string
以前の ADT バージョンは正常に動作していました。何か間違っているのでしょうか? フォーマット指定子が 1 つ以上ある場合は常にこのエラーが発生します。
ベストアンサー1
または、次のように、% フォーマット指定子を変更して引数インデックスを使用することもできます。
<string name="date_format">%1$d:%2$d %3$s</string>
Formatterクラスの詳細については、Android リファレンスドキュメント。