googlemaps-samples / googlemaps-samples/android-navigation-samples
Error APT2000 : multiple substitutions specified in non-positional format
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 16
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Using the current Navigation SDK version 6.3.0 I see the error:
Error APT2000 : multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
I could track it down to the following values.xml entries:
<string name="HEIGHT_FEET_INCHES_ABBREVIATED" msgid="8966636302039617408">"<xliff:g id="FEET">%d</xliff:g> ಅಡಿ <xliff:g id="INCHES">%d</xliff:g> ಇಂಚು"</string>
<string name="HEIGHT_FEET_INCHES_LONGFORM" msgid="8637363475448752754">"<xliff:g id="FEET">%d</xliff:g> ಅಡಿ <xliff:g id="INCHES">%d</xliff:g> ಇಂಚುಗಳು"</string>
The fix would be to add the parameter positions for %d.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the values.xml entries named HEIGHT_FEET_INCHES_ABBREVIATED and HEIGHT_FEET_INCHES_LONGFORM, which contain the two non-positional substitutions. Update the %d placeholders with parameter positions, then verify the Android resource build no longer reports APT2000.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100