Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADT shows error in Strings.xml

I updated my ADT to the latest version after Gingerbread was released. And now

<string name="date_format">%d:%d %s</string> 

shows the following error

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 

Previous ADT version worked fine. Am I doing something wrong? I get this error whenever there are more than 1 format specifiers.

like image 798
Ragunath Jawahar Avatar asked Dec 19 '10 18:12

Ragunath Jawahar


1 Answers

Or, alternatively, you can modify your % format specifiers to use argument indices, like so:

<string name="date_format">%1$d:%2$d %3$s</string> 

More info on the Formatter class in the Android Reference Docs.

like image 100
hopia Avatar answered Sep 22 '22 00:09

hopia