Build from source: Multiple strings.xml files having parsing problem

286 views
Skip to first unread message

Onkar Shinde

unread,
Jun 16, 2013, 4:26:58 AM6/16/13
to osm...@googlegroups.com
I am trying to build OsmAnd from source but I am seeing that multiple strings.xml file have parsing problem causing the build to fail. I am pasting here the error snippet.

     [aapt] C:\Users\IBM_ADMIN\git\Osmand\OsmAnd\res\values-ar\strings.xml:5: error: Error parsing XML: not well-formed (invalid token)
     [aapt] C:\Users\IBM_ADMIN\git\Osmand\OsmAnd\res\values-bg\strings.xml:13: error: Error parsing XML: not well-formed (invalid token)
     [aapt] C:\Users\IBM_ADMIN\git\Osmand\OsmAnd\res\values-bs\strings.xml:4: error: Error parsing XML: not well-formed (invalid token)
     [aapt] C:\Users\IBM_ADMIN\git\Osmand\OsmAnd\res\values-cs\strings.xml:82: error: Error parsing XML: not well-formed (invalid token)
     [aapt] C:\Users\IBM_ADMIN\git\Osmand\OsmAnd\res\values-de\strings.xml:104: error: Error parsing XML: not well-formed (invalid token)
     [aapt] C:\Users\IBM_ADMIN\git\Osmand\OsmAnd\res\values-el\strings.xml:2: error: Error parsing XML: not well-formed (invalid token)
     [aapt] C:\Users\IBM_ADMIN\git\Osmand\OsmAnd\res\values-es\strings.xml:63: error: Error parsing XML: not well-formed (invalid token)
     [aapt] C:\Users\IBM_ADMIN\git\Osmand\OsmAnd\res\values-fa\strings.xml:3: error: Error parsing XML: not well-formed (invalid token)


Could this be related to translation tool inserting some unnecessary character in XML files?

Victor Shcherb

unread,
Jun 16, 2013, 2:07:14 PM6/16/13
to osmand
So far these builds are successful http://new.osmand.net:8080/

Victor


--
You received this message because you are subscribed to the Google Groups "Osmand" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osmand+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Onkar Shinde

unread,
Jun 16, 2013, 5:52:42 PM6/16/13
to osm...@googlegroups.com
On Sunday, 16 June 2013 19:07:14 UTC+1, V S wrote:
So far these builds are successful http://new.osmand.net:8080/


I am building this on Windows 7 machine, if that makes any difference. 

Onkar Shinde

unread,
Jun 30, 2013, 1:38:47 PM6/30/13
to osm...@googlegroups.com
Recent translation commits seem to have fixed this problem for most XML files. It still remains for two files.

     [aapt] C:\Users\IBM_ADMIN\git\Osmand\OsmAnd\res\values-zh-rCN\strings.xml:3: error: Error parsing XML: not well-formed (invalid token)
     [aapt] C:\Users\IBM_ADMIN\git\Osmand\OsmAnd\res\values-zh-rTW\strings.xml:2: error: Error parsing XML: not well-formed (invalid token)

Marius Bieliauskas

unread,
Nov 15, 2013, 10:24:11 PM11/15/13
to osm...@googlegroups.com
The issue is with fix_apostrophe_issues build target.
Running ant on windows causes file encoding change to ANSI. Even "java.encoding=UTF-8" in properties or directly in javac element doesn't help.

To fix this, you have to manually replace single quotes in version and encoding attributes (<?xml version='1.0' encoding='UTF-8'?>)  with double quotes (<?xml version="1.0" encoding="UTF-8"?>) and later all single quotes that are not preceeded with slash (\).

Lars Herschke

unread,
May 29, 2014, 11:51:23 AM5/29/14
to osm...@googlegroups.com
You can use the attribute encoding="UTF-8" directly in the replace and the replaceregexp task. That worked for me.
Reply all
Reply to author
Forward
0 new messages