Android 2.3

Has been released with a new set of tools. ADT skipped from version 0.9.9 to 8.0.0, and you will get this:

error: Multiple substitutions specified in non-positional format; did you mean to add the formatted=”false” attribute

If you had something like

<string name="loading">my key %s is associated with a value of %s</string>

The reason is, Android now enforce substitution parameter order, you have to made the above.

<string name="loading">my key %1$s is associated with a value of %2$s</string>

This change is possibly due to internationalization problems, in some languages the second parameter should appear first.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.