I agree that for internationalization the order spec is important.

However, i read through the changes in the tools and SDK2.3 and I
didn't read about this particular change in aapt (where position is
now required, unless formatted="false" is used). Therefore, the error
came by surprise and it took me a while to figure out (thanks
Romain!).

Also, I only found an example of the positional parameters (1$, 2$,
etc) in an example on this page:
http://developer.android.com/guide/topics/resources/string-resource.html.
I assume that the format is "n$", where n is a digit (or more digits?)
that should appear right after the '%' character. Is this correct? If
not, where can i find more info on this particular format (the
Formatter java-doc does not say anything about the positional
parameters)..


On Dec 6, 4:31 pm, Xavier Ducrohet <[email protected]> wrote:
> This suddenly appears because, starting with tools r8, applications
> are compiled using the latest version of aapt (the tool that compiles
> the android resource).
>
> We used to use version of aapt specific to the version of Android you
> compiled against, but not anymore.
>
> Benefits of using the latest versions:
> - if we add a feature, you'll get it even if you compile against an
> older version. For instance, the new mode that automatically insert
> debuggable="true" in your manifest would not be usable on older
> versions.
> - you get bug fixes too, or behavioral changes. In this case, aapt is
> more strict, and while that may be annoying at first, this is really
> important to use positional format.
>
> Xav
>
> On Mon, Dec 6, 2010 at 11:47 AM, Streets Of Boston
>
>
>
>
>
> <[email protected]> wrote:
> > When this string is in my strings.xml
>
> >   <string name="home_activity_header_name">%s %s</string>
>
> > I get this error when compiling the source-code:
> > "error: Multiple substitutions specified in non-positional format; did
> > you mean to add the formatted="false" attribute"
>
> > I just upgraded to the newest tools (v 8.0.0) and downloaded the
> > latest SDK (2.3).
> > I compile under apil-leverl 8 and i tried compiling under api-level 9.
>
> > Why does this error suddenly appear?
> > Is there a way to get rid of it?
>
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
>
> Please do not send me questions directly. Thanks!- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to