December 13, 2010

[SOLVED] Android: Multiple substitutions specified in non-positional format

Getting an error after updating to SDK 0.8
Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute? strings.xml

It happens in string files on strings with %
	"%s/%s (Linux; Android)"

You should change it to
	"%1$s/%2$s (Linux; Android)"

Source: developer.android.com

1 comment:

  1. Without making any complication just use like this, With error you will get the line number as well, Using notepad++, go to relevant line number and do the following

    some %2$s content

    use formatted="false" and change like this

    some %2$s content

    Problem should be solve now

    ReplyDelete