Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Androidリソースで「@」で始まる文字列を追加する必要がありますが、エラーが発生します:
リソースタイプが指定されていません(「str1」で値「@%stest」)。
私の文字列は:
<string name="str1" formatted="false">@%s test</string>
文字列リソースに配置するために「@」をエンコードするにはどうすればよいですか?
私はあなたがそれを逃れることができるとかなり確信しています\@
\@
@記号はでエスケープする必要があり\ます。さらに、引数の位置を使用して引数を参照する必要があります。
@
\
<string name="str1" formatted="false">\@%1$s test</string>