My favorites | Sign in
Project Home Issues
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 23940: ADT setting Format XML with Android XML Style can corrupt string resources.
4 people starred this issue and may be notified of changes. Back to list
Status:  Released
Closed:  Jan 2012

Sign in to add a comment
Reported by, Jan 4, 2012
Host OS: Linux
SDK tools version (available in the "About" section of the 'android' tool
UI): Revision 16
Eclipse version: Indigo Service Release 1, Build id: 20110916-0149
ADT plug-in version: Version: 16.0.1.v201112150204-238534 (also saw this on Version 15).
Platform targeted by your project: SDK 10
Version of the platform running in the emulator: N/A

1. Within Eclipse, select Window -> Preferences.
2. Select the preferences for Android -> Editors
3. Enable the checkbox for "Format XML files using the standard Android XML style ..."
4. Enable checkbox for "Format on Save"
5. Edit a resource file, text.xml(attached). Save the file within the Eclipse Editor.

<string name="test_string">a </string>

<string name="test_string"> </string>

Removing the formatting options stated above, seems to prevent the problem from occurring. Basically the first character of the string is chopped off for all strings ending in a newline. Across an entire file this is really annoying/scary. 

108 bytes   Download
104 bytes   Download
Jan 5, 2012
Project Member #1
(No comment was entered for this change.)
Jan 5, 2012
Project Member #2
I can reproduce it. Will fix right away.
Status: Assigned
Jan 5, 2012
Project Member #3
Fix pending in changeset 6c4b8c1257da2fba53ffeee7c449939b42770b5c.
Jan 5, 2012
Project Member #4
I've uploaded a build of ADT 16 + this fix to
in case you want to verify the fix. Installation instructions are basically those from
Jan 6, 2012
Project Member #5
Fixed in ADT 17. If we do a 16.0.2 I'll backport it.
Status: FutureRelease
Labels: Target-r17
Feb 21, 2012
Project Member #6
 Issue 25792  has been merged into this issue.
Feb 23, 2012
I have the same problem.
I thought that was because of the Greek characters fault.
My strings got chopped off and i had to check all my strings again and repairing this.
Please fix this as soon as posible! 
Feb 24, 2012
Project Member #9
This was fixed in ADT 17, and there's an ADT 17 preview out now which contains this fix.
Mar 23, 2012
Project Member #10
Fixed in ADT 17, now released.
Status: Released
Sign in to add a comment

Powered by Google Project Hosting