So how do I include in a string resource the '%' character?
VALID
<string name="my_string">Total discount boundary:\nmin=%1$s nmax=%2$s</string>
INVALID
<string name="my_string">Total discount boundary:\nmin=%1$s % nmax=%2$s %</string>
Adding formatted="false" helped me. This
<string name="parser_error_convert" formatted="false">Parser error, line %d, \'%s\', cannot convert \'%s\'</string>
works with my strings and I expect it would help also in case of your strings. Double %% does not help because you will get %% (not %) as a result.
This problem depends on the plugin version, I am using Android Developer Studio 23.0.2.
You should be able to use %%
to get a percentage sign without being parsed as a string format character.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With