Q:

Storing formattable string resource in string.xml

How do I store a formattable string resource in res/value/string.xml so that it does not break my R.java? Presently I simply have the following but it's not working.
<string name="format_able">This is a formatable string resource with %s and %s as place holders</string>

But eclipse does not redline it. So it took me hours to figure that this was the reason my R was not being generated. So how do I escape the %s?

A:

I found the answer finally at http://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling specifically 
 <string name="welcome_messages">Hello, %1$s! You have %2$d new messages.</string>

I was missing 1$, 2$, etc.

