I was actually running version 0.9.x of the Android Gradle plugin when I
ran into this issue. I tried incrementing to 0.10.x to see if the problem
is fixed, and it wasn't. I've been running ./gradlew clean after making
changes to make sure they take effect.
I have a couple scripts like this that replace strings in XML files.
Removing these didn't do anything. I'll keep reiterating that this is only
happening on one machine, so it might have something to do with a system
configuration issue.
variant.mergeResources.doLast{
println("Checking for the Jenkins build number")
ext.env = System.getenv()
def buildNumber = env.BUILD_NUMBER
if (buildNumber != null) {
File valuesFile =
file("${buildDir}/res/all/${variant.dirName}/values/values.xml")
println("Replacing revision number in " + valuesFile)
println("Build number = " + buildNumber)
String content = valuesFile.getText('UTF-8')
content = content.replaceAll(/devBuild/, buildNumber)
valuesFile.write(content, 'UTF-8')
}
}
On Monday, May 5, 2014 5:40:56 PM UTC-7, Seth Goldenberg wrote:
>
> It seems related to this bug, but I'm already implementing Xavier's
> workaround to write back to UTF-8. I also can only reproduce this on one
> machine.
> https://code.google.com/p/android/issues/detail?id=61613
>
> On Monday, May 5, 2014 4:55:42 PM UTC-7, Seth Goldenberg wrote:
>>
>> Strange issue here with merging resources. I have a build machine that's
>> botching the encoding of some unicode characters in my XML when merging
>> resources. This is building just fine on my own machine.
>>
>> This line is in an exploded AAR prior to being merged:
>> (From
>> build/exploded-aar/com.facebook/facebook-android-sdk/3.5.2/res/values/values.xml)
>> <string name="com_facebook_placepicker_subtitle_format">%1$s • %2$,d were
>> here</string>
>>
>> And like this after being merged:
>> (From build/res/all/release/values/values.xml)
>> <string name="com_facebook_placepicker_subtitle_format">%1$s ¥ %2$,d were
>> here</string>
>>
>> aapt (version 19.0.3) chokes with this error on the line above:
>> error: Error parsing XML: not well-formed (invalid token)
>>
>> This error does not happen on my personal machine. Both are running Mac
>> OS X 10.9.2. What dependency does aapt have that the same version of it
>> would produce different outputs on different machines?
>>
>> Thanks,
>> Seth
>>
>
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.