Saturday, December 11, 2010

Android "Gingerbread" SDK - first issues

I downloaded Android "Gingerbread" 2.3 SDK with the new tools the same day it came out, and started to get nuch of errors with the string resources that were using formatting flags: SDK 2.3: Get "Multiple substitutions specified in non-positional format" error.

So the issue was that with the latest SDK tools the absence of positional identifiers in the resource string ends up flagged as errors. Here is a little bit more discussion on this problem:
http://groups.google.com

The solution is to change the resource strings to look like this:
Hello, %1$s! You have %2$d new messages.